Skip to content

Commit

Permalink
Simplify conditional linking with libdl
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Oct 9, 2013
1 parent 24308ae commit 7ee417a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 24 deletions.
4 changes: 1 addition & 3 deletions eqlaunch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 1 addition & 3 deletions loginserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 1 addition & 3 deletions queryserv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 1 addition & 3 deletions shared_memory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 1 addition & 4 deletions ucs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 1 addition & 4 deletions world/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 1 addition & 3 deletions zone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 7ee417a

Please sign in to comment.