diff options
| author | redfish <redfish@galactica.pw> | 2016-07-10 18:57:53 -0400 |
|---|---|---|
| committer | redfish <redfish@galactica.pw> | 2016-07-10 21:27:00 -0400 |
| commit | f4b35aeafd398fe47ba89b55860f441c3fcd2dc6 (patch) | |
| tree | b96f48d6a29ea1659a910b3155e7e72b2fdbd4cb | |
| parent | fa85cd845f6d69e511eb5bfa11243c4cf1b798f7 (diff) | |
| download | monzero-core-f4b35aeafd398fe47ba89b55860f441c3fcd2dc6.tar.gz monzero-core-f4b35aeafd398fe47ba89b55860f441c3fcd2dc6.tar.xz monzero-core-f4b35aeafd398fe47ba89b55860f441c3fcd2dc6.zip | |
cmake: include -ldl via cmake built-in var
This does two things:
1. fixes clang build, which otherwise errors with undefined symbol
'dlsym'.
2. simplifies the cmake script, delegating to cmake to figure
out platform-specific flags for linking against the dl library.
| -rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d266671ca..673be4a8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -455,10 +455,7 @@ elseif(NOT MSVC) set(EXTRA_LIBRARIES ${RT}) endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT MINGW) - find_library(DL dl) - set(EXTRA_LIBRARIES ${DL}) -endif() +list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS}) include(version.cmake) |
