Make sure libdl is linked after libcrypto.

Fixes a `undefined reference to symbol 'dlclose@@GLIBC_2.2.5' error
I was running into on Linux Mint 17.2.
This commit is contained in:
Rudi Chen 2015-09-06 21:08:50 -04:00
parent f2fdb97f16
commit b703ce01fb
3 changed files with 10 additions and 4 deletions

View file

@ -13,10 +13,6 @@ link_hifi_libraries(
physics
)
if (UNIX)
target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS})
endif (UNIX)
include_application_version()
copy_dlls_beside_windows_executable()

View file

@ -31,5 +31,10 @@ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
# append OpenSSL to our list of libraries to link
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
# libcrypto uses dlopen in libdl
if (UNIX)
target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS})
endif (UNIX)
include_application_version()
copy_dlls_beside_windows_executable()

View file

@ -27,6 +27,11 @@ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
# append OpenSSL to our list of libraries to link
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES} ${TBB_LIBRARIES})
# libcrypto uses dlopen in libdl
if (UNIX)
target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS})
endif (UNIX)
# append tbb includes to our list of includes to bubble
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${TBB_INCLUDE_DIRS})
include_application_version()