Replace dl linking with cmake-based variable

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/329/head
Michele Calgaro 6 months ago
parent af644c0201
commit 95c36461d4
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -487,14 +487,10 @@ check_function_exists( madvise HAVE_MADVISE )
check_function_exists( getgroups HAVE_GETGROUPS ) check_function_exists( getgroups HAVE_GETGROUPS )
check_symbol_exists( posix_fadvise "fcntl.h" HAVE_FADVISE ) check_symbol_exists( posix_fadvise "fcntl.h" HAVE_FADVISE )
check_function_exists( getcwd HAVE_GETCWD ) check_function_exists( getcwd HAVE_GETCWD )
tde_save_and_set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS} )
check_function_exists( dlopen HAVE_LIBDL
check_function_exists( dlerror HAVE_DLERROR ) check_function_exists( dlerror HAVE_DLERROR )
if( NOT HAVE_DLERROR ) tde_restore( CMAKE_REQUIRED_LIBRARIES )
check_library_exists( dl dlerror "" HAVE_DLERROR_LIB )
if( HAVE_DLERROR_LIB )
set( HAVE_DLERROR 1 )
set( DLERROR_LIBRARIES dl )
endif( HAVE_DLERROR_LIB )
endif( NOT HAVE_DLERROR )
check_function_exists( crypt HAVE_CRYPT ) check_function_exists( crypt HAVE_CRYPT )
if( NOT HAVE_CRYPT ) if( NOT HAVE_CRYPT )
check_library_exists( crypt crypt "" HAVE_CRYPT_LIB ) check_library_exists( crypt crypt "" HAVE_CRYPT_LIB )
@ -652,20 +648,6 @@ if( WITH_TDEHWLIB )
endif( WITH_TDEHWLIB ) endif( WITH_TDEHWLIB )
##### check for libdl ###########################
set( DL_LIBRARIES dl )
check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL )
if( NOT HAVE_LIBDL )
unset( DL_LIBRARIES )
check_function_exists( dlopen HAVE_DLOPEN )
if( HAVE_DLOPEN )
set( HAVE_LIBDL 1 )
endif( HAVE_DLOPEN )
endif( NOT HAVE_LIBDL )
check_library_exists( dld, dld_link "" HAVE_DLD )
##### check for magic ########################### ##### check for magic ###########################
set( MAGIC_LIBRARIES magic ) set( MAGIC_LIBRARIES magic )

@ -82,7 +82,7 @@ set( ${target}_SRCS
tde_add_executable( ${target} tde_add_executable( ${target}
SOURCES ${${target}_SRCS} SOURCES ${${target}_SRCS}
LINK driverparse-static tdefakes-shared ${ZLIB_LIBRARIES} ${DL_LIBRARIES} ${TQT_LIBRARIES} LINK driverparse-static tdefakes-shared ${ZLIB_LIBRARIES} ${CMAKE_DL_LIBS} ${TQT_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR} DESTINATION ${BIN_INSTALL_DIR}
) )

@ -80,6 +80,6 @@ set( ${target}_SRCS
tde_add_executable( ${target} tde_add_executable( ${target}
SOURCES ${${target}_SRCS} SOURCES ${${target}_SRCS}
LINK driverparse-static tdefakes-shared ${DL_LIBRARIES} LINK driverparse-static tdefakes-shared ${CMAKE_DL_LIBS}
DESTINATION ${BIN_INSTALL_DIR} DESTINATION ${BIN_INSTALL_DIR}
) )

@ -36,6 +36,6 @@ set( ${target}_SRCS
tde_add_kpart( ${target} AUTOMOC tde_add_kpart( ${target} AUTOMOC
SOURCES ${${target}_SRCS} SOURCES ${${target}_SRCS}
LINK tdefx-shared tdecore-shared ${DL_LIBRARIES} LINK tdefx-shared tdecore-shared ${CMAKE_DL_LIBS}
DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles
) )

Loading…
Cancel
Save