Replace pthread and dl linking with cmake-based variables

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/570/head
Michele Calgaro 3 months ago
parent ab81005c21
commit 3df12e580b
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -28,6 +28,7 @@ set( PACKAGE tdebase )
##### include essential cmake modules ###########
include( FindPkgConfig )
include( FindThreads )
include( CheckIncludeFile )
include( CheckIncludeFiles )
include( CheckCSourceRuns )

@ -50,19 +50,6 @@ if( WITH_USBIDS )
endif( WITH_USBIDS )
##### 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 )
# stdint.h (drkonqi)
if( BUILD_DRKONQI )
check_include_file( stdint.h HAVE_STDINT_H )
@ -117,7 +104,7 @@ if( BUILD_KCHECKPASS OR BUILD_TDM )
check_include_file( "security/pam_appl.h" SECURITY_PAM_APPL_H )
endif( )
if( HAVE_PAM AND SECURITY_PAM_APPL_H )
set( PAM_LIBRARY pam ${DL_LIBRARIES} )
set( PAM_LIBRARY pam ${CMAKE_DL_LIBS} )
else( )
tde_message_fatal( "pam are requested, but not found on your system" )
endif( )

@ -96,9 +96,9 @@ set( ${target}_SRCS
tde_add_tdeinit_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK
pthread kdesktopsettings-static bgnd-static dmctl-static
${CMAKE_THREAD_LIBS_INIT} kdesktopsettings-static bgnd-static dmctl-static
konq-shared tdeutils-shared tdesu-shared ${TDEHW_LIBRARIES}
${XRENDER_LIBRARIES} ${XCURSOR_LIBRARIES} Xext ${DL_LIBRARIES}
${XRENDER_LIBRARIES} ${XCURSOR_LIBRARIES} Xext ${CMAKE_DL_LIBS}
${XSS_LIBRARIES} ${DBUS_1_TQT_LIBRARIES}
)

@ -41,7 +41,7 @@ set( ${target}_SRCS
tde_add_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK kdesktopsettings-static dmctl-static tdeio-shared Xext ${TDEHW_LIBRARIES}
pthread ${GL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT} ${GL_LIBRARIES}
"${LINKER_IMMEDIATE_BINDING_FLAGS}"
DESTINATION ${BIN_INSTALL_DIR}
)

@ -78,5 +78,5 @@ set( ${target}_SRCS
tde_add_tdeinit_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK tdeprint-shared tdeio-shared ${XRENDER_LIBRARIES} ${DL_LIBRARIES}
LINK tdeprint-shared tdeio-shared ${XRENDER_LIBRARIES} ${CMAKE_DL_LIBS}
)

@ -31,6 +31,6 @@ tde_add_executable( nspluginviewer AUTOMOC
../NSPluginCallbackIface.stub NSPluginClassIface.skel
nsplugin.cpp viewer.cpp qxteventloop.cpp
glibevents.cpp
LINK tdeparts-shared tdeio-shared ${GLIB2_LIBRARIES} Xt ${DL_LIBRARIES}
LINK tdeparts-shared tdeio-shared ${GLIB2_LIBRARIES} Xt ${CMAKE_DL_LIBS}
DESTINATION ${BIN_INSTALL_DIR}
)

@ -49,6 +49,8 @@ tde_add_executable( tdm
process.c protodpy.c reset.c resource.c rpcauth.c
server.c session.c sessreg.c socket.c streams.c
util.c xdmauth.c xdmcp.c
LINK X11 pthread ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY} ${PAM_LIBRARY} ${UTIL_LIBRARY} ${XDMCP_LIBRARIES}
LINK
X11 ${CMAKE_THREAD_LIBS_INIT} ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY}
${PAM_LIBRARY} ${UTIL_LIBRARY} ${XDMCP_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)

Loading…
Cancel
Save