Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace 'dl' with ${CMAKE_DL_LIBS} to make it work on systems without libdl #789

Merged
merged 1 commit into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
cmake_policy(SET CMP0054 OLD)
endif()

if(CMAKE_VERSION VERSION_LESS "3.0")
SET(CMAKE_DL_LIBS "-ldl")
endif()

include( XRootDUtils )
CheckBuildDirectory()

Expand Down
2 changes: 1 addition & 1 deletion src/XrdApps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ target_link_libraries(
XrdClient
XrdUtils
XrdAppUtils
dl
${CMAKE_DL_LIBS}
pthread
${EXTRA_LIBS} )

Expand Down
2 changes: 1 addition & 1 deletion src/XrdCl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ target_link_libraries(
XrdXml
XrdUtils
pthread
dl)
${CMAKE_DL_LIBS})

set_target_properties(
XrdCl
Expand Down
2 changes: 1 addition & 1 deletion src/XrdClient.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ add_library(
target_link_libraries(
XrdClient
XrdUtils
dl
${CMAKE_DL_LIBS}
pthread )

set_target_properties(
Expand Down
2 changes: 1 addition & 1 deletion src/XrdCrypto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ add_library(
target_link_libraries(
XrdCrypto
XrdUtils
dl )
${CMAKE_DL_LIBS} )

set_target_properties(
XrdCrypto
Expand Down
2 changes: 1 addition & 1 deletion src/XrdDaemons.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ target_link_libraries(
xrootd
XrdServer
XrdUtils
dl
${CMAKE_DL_LIBS}
pthread
${EXTRA_LIBS}
${SOCKET_LIBRARY} )
Expand Down
2 changes: 1 addition & 1 deletion src/XrdHttp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if( BUILD_HTTP )
XrdServer
XrdUtils
XrdCrypto
dl
${CMAKE_DL_LIBS}
pthread
${OPENSSL_LIBRARIES}
${OPENSSL_CRYPTO_LIBRARY} )
Expand Down
2 changes: 1 addition & 1 deletion src/XrdMacaroons.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if( BUILD_MACAROONS )
XrdMacaroons/XrdMacaroonsConfigure.cc)

target_link_libraries(
${LIB_XRD_MACAROONS} -ldl
${LIB_XRD_MACAROONS} ${CMAKE_DL_LIBS}
XrdHttpUtils
XrdUtils
XrdServer
Expand Down
2 changes: 1 addition & 1 deletion src/XrdPosix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ add_library(
target_link_libraries(
XrdPosixPreload
XrdPosix
dl )
${CMAKE_DL_LIBS} )

set_target_properties(
XrdPosixPreload
Expand Down
2 changes: 1 addition & 1 deletion src/XrdSec.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ target_link_libraries(
${LIB_XRD_SEC}
XrdUtils
pthread
dl )
${CMAKE_DL_LIBS} )

set_target_properties(
${LIB_XRD_SEC}
Expand Down
2 changes: 1 addition & 1 deletion src/XrdServer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ add_library(
target_link_libraries(
XrdServer
XrdUtils
dl
${CMAKE_DL_LIBS}
pthread
${EXTRA_LIBS}
${SOCKET_LIBRARY} )
Expand Down
2 changes: 1 addition & 1 deletion src/XrdTpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if( BUILD_TPC )
XrdServer
XrdUtils
XrdHttpUtils
dl
${CMAKE_DL_LIBS}
pthread
${CURL_LIBRARIES} )

Expand Down
2 changes: 1 addition & 1 deletion src/XrdUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ add_library(
target_link_libraries(
XrdUtils
pthread
dl
${CMAKE_DL_LIBS}
${SOCKET_LIBRARY}
${SENDFILE_LIBRARY}
${EXTRA_LIBS} )
Expand Down
2 changes: 1 addition & 1 deletion tests/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ target_link_libraries(
XrdUtils)

add_executable(text-runner TextRunner.cc PathProcessor.hh)
target_link_libraries(text-runner dl ${CPPUNIT_LIBRARIES} pthread)
target_link_libraries(text-runner ${CMAKE_DL_LIBS} ${CPPUNIT_LIBRARIES} pthread)

#-------------------------------------------------------------------------------
# Install
Expand Down