From 7ee417ab05a3513b8dab28b64bc37cc66676f419 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 9 Oct 2013 00:46:43 +0400 Subject: [PATCH] Simplify conditional linking with libdl --- eqlaunch/CMakeLists.txt | 4 +--- loginserver/CMakeLists.txt | 4 +--- queryserv/CMakeLists.txt | 4 +--- shared_memory/CMakeLists.txt | 4 +--- tests/CMakeLists.txt | 2 +- ucs/CMakeLists.txt | 5 +---- world/CMakeLists.txt | 5 +---- zone/CMakeLists.txt | 4 +--- 8 files changed, 8 insertions(+), 24 deletions(-) diff --git a/eqlaunch/CMakeLists.txt b/eqlaunch/CMakeLists.txt index 5c9ad6a60..0f0114c88 100644 --- a/eqlaunch/CMakeLists.txt +++ b/eqlaunch/CMakeLists.txt @@ -27,9 +27,7 @@ IF(MINGW) ENDIF(MINGW) IF(UNIX) - IF(NOT FREEBSD) - TARGET_LINK_LIBRARIES(eqlaunch "dl") - ENDIF(NOT FREEBSD) + TARGET_LINK_LIBRARIES(eqlaunch "${CMAKE_DL_LIBS}") TARGET_LINK_LIBRARIES(eqlaunch "z") TARGET_LINK_LIBRARIES(eqlaunch "m") TARGET_LINK_LIBRARIES(eqlaunch "rt") diff --git a/loginserver/CMakeLists.txt b/loginserver/CMakeLists.txt index 7a4272a70..ba96b1f61 100644 --- a/loginserver/CMakeLists.txt +++ b/loginserver/CMakeLists.txt @@ -55,9 +55,7 @@ IF(MINGW) ENDIF(MINGW) IF(UNIX) - IF(NOT FREEBSD) - TARGET_LINK_LIBRARIES(loginserver "dl") - ENDIF(NOT FREEBSD) + TARGET_LINK_LIBRARIES(loginserver "${CMAKE_DL_LIBS}") TARGET_LINK_LIBRARIES(loginserver "z") TARGET_LINK_LIBRARIES(loginserver "m") TARGET_LINK_LIBRARIES(loginserver "rt") diff --git a/queryserv/CMakeLists.txt b/queryserv/CMakeLists.txt index 8b8196b12..a8480ca94 100644 --- a/queryserv/CMakeLists.txt +++ b/queryserv/CMakeLists.txt @@ -33,9 +33,7 @@ IF(MINGW) ENDIF(MINGW) IF(UNIX) - IF(NOT FREEBSD) - TARGET_LINK_LIBRARIES(queryserv "dl") - ENDIF(NOT FREEBSD) + TARGET_LINK_LIBRARIES(queryserv "${CMAKE_DL_LIBS}") TARGET_LINK_LIBRARIES(queryserv "z") TARGET_LINK_LIBRARIES(queryserv "m") TARGET_LINK_LIBRARIES(queryserv "rt") diff --git a/shared_memory/CMakeLists.txt b/shared_memory/CMakeLists.txt index 76c8b75bd..da4e6d609 100644 --- a/shared_memory/CMakeLists.txt +++ b/shared_memory/CMakeLists.txt @@ -33,9 +33,7 @@ IF(MINGW) ENDIF(MINGW) IF(UNIX) - IF(NOT FREEBSD) - TARGET_LINK_LIBRARIES(shared_memory "dl") - ENDIF(NOT FREEBSD) + TARGET_LINK_LIBRARIES(shared_memory "${CMAKE_DL_LIBS}") TARGET_LINK_LIBRARIES(shared_memory "z") TARGET_LINK_LIBRARIES(shared_memory "m") TARGET_LINK_LIBRARIES(shared_memory "rt") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 649285b8b..2cffeae88 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -27,7 +27,7 @@ IF(MINGW) ENDIF(MINGW) IF(UNIX) - TARGET_LINK_LIBRARIES(tests "dl") + TARGET_LINK_LIBRARIES(tests "${CMAKE_DL_LIBS}") TARGET_LINK_LIBRARIES(tests "z") TARGET_LINK_LIBRARIES(tests "m") TARGET_LINK_LIBRARIES(tests "rt") diff --git a/ucs/CMakeLists.txt b/ucs/CMakeLists.txt index 6603470f6..27a8a072d 100644 --- a/ucs/CMakeLists.txt +++ b/ucs/CMakeLists.txt @@ -35,10 +35,7 @@ IF(MINGW) ENDIF(MINGW) IF(UNIX) - - IF(NOT FREEBSD) - TARGET_LINK_LIBRARIES(ucs "dl") - ENDIF(NOT FREEBSD) + TARGET_LINK_LIBRARIES(ucs "${CMAKE_DL_LIBS}") TARGET_LINK_LIBRARIES(ucs "z") TARGET_LINK_LIBRARIES(ucs "m") TARGET_LINK_LIBRARIES(ucs "rt") diff --git a/world/CMakeLists.txt b/world/CMakeLists.txt index a14505485..2decbf4c9 100644 --- a/world/CMakeLists.txt +++ b/world/CMakeLists.txt @@ -81,10 +81,7 @@ IF(MINGW) ENDIF(MINGW) IF(UNIX) - - IF(NOT FREEBSD) - TARGET_LINK_LIBRARIES(world "dl") - ENDIF(NOT FREEBSD) + TARGET_LINK_LIBRARIES(world "${CMAKE_DL_LIBS}") TARGET_LINK_LIBRARIES(world "z") TARGET_LINK_LIBRARIES(world "m") TARGET_LINK_LIBRARIES(world "rt") diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 3cf5b0cf2..9e45b698a 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -223,9 +223,7 @@ IF(MINGW) ENDIF(MINGW) IF(UNIX) - IF(NOT FREEBSD) - TARGET_LINK_LIBRARIES(zone "dl") - ENDIF(NOT FREEBSD) + TARGET_LINK_LIBRARIES(zone "${CMAKE_DL_LIBS}") TARGET_LINK_LIBRARIES(zone "z") TARGET_LINK_LIBRARIES(zone "m") TARGET_LINK_LIBRARIES(zone "rt")