From 443e656be25e3a5d433bc57813edc28831ff3e1a Mon Sep 17 00:00:00 2001 From: coypu Date: Thu, 2 Aug 2018 15:42:20 +0300 Subject: [PATCH] Use ${CMAKE_DL_LIBS} rather than listing OSes. CMake makes our lives easier. Needed for NetBSD, which also doesn't have libdl.so. --- src/lib/arch/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/arch/CMakeLists.txt b/src/lib/arch/CMakeLists.txt index 113cdd99..db92634e 100644 --- a/src/lib/arch/CMakeLists.txt +++ b/src/lib/arch/CMakeLists.txt @@ -41,7 +41,5 @@ add_library(arch STATIC ${sources}) if (UNIX) target_link_libraries(arch ${libs}) - if (NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - target_link_libraries(arch dl) - endif() + target_link_libraries(arch ${CMAKE_DL_LIBS}) endif()