include(CMakePushCheckState)
include(CheckTypeSize)
include(CheckSymbolExists)
+include(CheckLibraryExists)
if (PAM_FOUND)
set(KDE4_COMMON_PAM_SERVICE "kde" CACHE STRING "The PAM service to use unless overridden for a particular app.")
check_function_exists(XRRGetScreenResourcesCurrent XRANDR_1_3_FOUND)
macro_bool_to_01(XRANDR_1_3_FOUND HAS_RANDR_1_3)
cmake_reset_check_state()
+
+
+macro(define_library LIB FN)
+ set(varname ${FN}_in_${LIB})
+ string(TOUPPER ${LIB}_LIBRARIES libname)
+ check_library_exists(${LIB} ${FN} "" ${varname})
+ set(${libname})
+ if (${varname})
+ set(${libname} ${LIB})
+ endif (${varname})
+endmacro(define_library)
+
+# for Solaris
+define_library(s authenticate)
+define_library(posix4 sched_yield)
+define_library(socket connect)
+define_library(resolv dn_expand)
+define_library(nsl gethostbyname)
endif (PAM_FOUND)
cmake_reset_check_state()
-
-macro(define_library LIB FN)
- set(varname ${FN}_in_${LIB})
- string(TOUPPER ${LIB}_LIBRARIES libname)
- check_library_exists(${LIB} ${FN} "" ${varname})
- set(${libname})
- if (${varname})
- set(${libname} ${LIB})
- endif (${varname})
-endmacro(define_library)
-
-define_library(s authenticate)
-define_library(posix4 sched_yield)
-define_library(socket connect)
-define_library(resolv dn_expand)
-
-# for Solaris
-check_function_exists(gethostbyname have_gethostbyname)
-if (NOT have_gethostbyname)
- define_library(nsl gethostbyname)
-endif (NOT have_gethostbyname)
-
cmake_reset_check_state()
set(CMAKE_REQUIRED_LIBRARIES ${SOCKET_LIBRARIES})
check_c_source_runs("
add_executable(kscreenlocker_greet ${kscreenlocker_greet_SRCS})
target_link_libraries(kscreenlocker_greet
- kworkspace
${KDE4_KDEUI_LIBS}
${KDE4_SOLID_LIBS}
${QT_QTDECLARATIVE_LIBRARY}
${X11_LIBRARIES}
${KDE4_PLASMA_LIBS}
- ${KDE4_PLASMA_LIBS}
${KDE4_KDECLARATIVE_LIBS}
+ ${SOCKET_LIBRARIES}
+ kworkspace
)
install(TARGETS kscreenlocker_greet DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
add_executable(plasma-overlay ${plasma-overlay_SRCS})
-target_link_libraries(plasma-overlay ${KDE4_PLASMA_LIBS} kworkspace ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS}
- ${X11_X11_LIB} plasmagenericshell ${QT_QTDECLARATIVE_LIBRARY} kdeclarative)
+target_link_libraries(plasma-overlay
+ ${KDE4_PLASMA_LIBS}
+ ${KDE4_KIO_LIBS}
+ ${KDE4_KFILE_LIBS}
+ ${QT_QTDECLARATIVE_LIBRARY}
+ ${X11_X11_LIB}
+ ${SOCKET_LIBRARIES}
+ kworkspace
+ plasmagenericshell
+ kdeclarative
+)
+
if(X11_Xrender_FOUND)
target_link_libraries(plasma-overlay ${X11_Xrender_LIB})
endif(X11_Xrender_FOUND)