From c910c820f9973fc1cea6751ac7cb4a90acdcf378 Mon Sep 17 00:00:00 2001 From: Joel Gallant Date: Tue, 22 Mar 2016 13:06:04 -0600 Subject: [PATCH] Linking to libdl correctly https://stackoverflow.com/questions/1274529/building-project-involving-cmake-how-do-i-make-it-aware-of-libraries --- src/CMakeLists.txt | 2 +- test/CMakeLists.txt | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f989aa89..7c561797 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -45,7 +45,7 @@ if (CIVETWEB_ENABLE_SLL AND NOT CIVETWEB_ENABLE_OPENSLL_DYNAMIC_LOADING) else() find_package(LibDl) if (LIBDL_FOUND) - target_link_libraries(c-library LIBDL::LIBDL) + target_link_libraries(c-library -ldl) endif() endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 092958a4..8af40706 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,8 +1,3 @@ -if (${CMAKE_VERSION} VERSION_GREATER 3.0.2 OR - ${CMAKE_VERSION} VERSION_EQUAL 3.0.2) - cmake_policy(SET CMP0028 OLD) -endif() - # Determine if we should print to the output if (CIVETWEB_ENABLE_THIRD_PARTY_OUTPUT) set(THIRD_PARTY_LOGGING 0)