Fix drogon_ctl runtime error when compiling drogon to shared library (#397)

Fix for #395
This commit is contained in:
ihmc3jn09hk 2020-03-21 08:40:25 +08:00 committed by GitHub
parent 06bf158676
commit 98ab826cfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -28,10 +28,10 @@ set(INSTALL_DROGON_CMAKE_DIR
if(BUILD_DROGON_SHARED)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${INSTALL_LIB_DIR}"
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}"
isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${INSTALL_LIB_DIR}")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}")
endif("${isSystemDir}" STREQUAL "-1")
add_library(${PROJECT_NAME} SHARED)
else(BUILD_DROGON_SHARED)