Fix hardcoded link flag to "dl" library

Fix "dlopen" function detection
pull/16/head
François Andriot 10 years ago committed by Slávek Banko
parent 67d3c303f3
commit af2c2afb25

@ -475,10 +475,15 @@ set( kde_socklen_t socklen_t )
##### check for libdl ###########################
find_library( HAVE_LIBDL dl )
if( NOT HAVE_LIBDL-NOTFOUND )
set( DL_LIBRARIES dl )
endif( NOT HAVE_LIBDL-NOTFOUND )
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 for utempter ########################

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

Loading…
Cancel
Save