2014-11-13 19:30:51 +02:00
|
|
|
include(UnixAuth)
|
2020-02-19 22:28:44 +02:00
|
|
|
set_package_properties(PAM PROPERTIES
|
|
|
|
DESCRIPTION "PAM Libraries"
|
|
|
|
URL "https://www.kernel.org/pub/linux/libs/pam/"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
PURPOSE "Required for screen unlocking and optionally used by the KDM log in manager"
|
|
|
|
)
|
|
|
|
|
|
|
|
include(CMakePushCheckState)
|
2014-11-13 19:30:51 +02:00
|
|
|
include(CheckTypeSize)
|
2020-02-24 19:41:26 +00:00
|
|
|
include(CheckSymbolExists)
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
if (PAM_FOUND)
|
|
|
|
set(KDE4_COMMON_PAM_SERVICE "kde" CACHE STRING "The PAM service to use unless overridden for a particular app.")
|
|
|
|
|
|
|
|
macro(define_pam_service APP)
|
|
|
|
string(TOUPPER ${APP}_PAM_SERVICE var)
|
|
|
|
set(cvar KDE4_${var})
|
|
|
|
set(${cvar} "${KDE4_COMMON_PAM_SERVICE}" CACHE STRING "The PAM service for ${APP}.")
|
|
|
|
mark_as_advanced(${cvar})
|
|
|
|
set(${var} "\"${${cvar}}\"")
|
|
|
|
endmacro(define_pam_service)
|
|
|
|
|
|
|
|
define_pam_service(KDM)
|
|
|
|
define_pam_service(kscreensaver)
|
|
|
|
|
|
|
|
endif (PAM_FOUND)
|
|
|
|
|
|
|
|
find_program(some_x_program NAMES iceauth xrdb xterm)
|
|
|
|
if (NOT some_x_program)
|
2021-06-01 16:38:19 +03:00
|
|
|
set(some_x_program ${CMAKE_INSTALL_PREFIX}/bin/xrdb)
|
|
|
|
message("Warning: Could not determine X binary directory. Assuming ${CMAKE_INSTALL_PREFIX}/bin.")
|
2014-11-13 19:30:51 +02:00
|
|
|
endif (NOT some_x_program)
|
|
|
|
get_filename_component(proto_xbindir "${some_x_program}" PATH)
|
|
|
|
get_filename_component(XBINDIR "${proto_xbindir}" ABSOLUTE)
|
|
|
|
get_filename_component(xrootdir "${XBINDIR}" PATH)
|
|
|
|
set(XLIBDIR "${xrootdir}/lib/X11")
|
2015-07-11 21:27:27 +03:00
|
|
|
set(XKBDIR "${xrootdir}/share/X11")
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
check_function_exists(getpassphrase HAVE_GETPASSPHRASE)
|
|
|
|
check_function_exists(vsyslog HAVE_VSYSLOG)
|
2020-02-24 19:41:26 +00:00
|
|
|
check_function_exists(nice HAVE_NICE)
|
2014-11-13 19:30:51 +02:00
|
|
|
|
2020-02-24 19:41:26 +00:00
|
|
|
check_include_files(string.h HAVE_STRING_H)
|
|
|
|
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
|
2014-11-13 19:30:51 +02:00
|
|
|
check_include_files(limits.h HAVE_LIMITS_H)
|
|
|
|
check_include_files(sys/time.h HAVE_SYS_TIME_H) # ksmserver, ksplashml, sftp
|
|
|
|
check_include_files(stdint.h HAVE_STDINT_H) # kcontrol/kfontinst
|
|
|
|
check_include_files(unistd.h HAVE_UNISTD_H)
|
|
|
|
check_include_files(malloc.h HAVE_MALLOC_H)
|
|
|
|
macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst}
|
|
|
|
macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE) # kcontrol/fonts
|
2021-03-02 22:08:04 +02:00
|
|
|
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # ksplash
|
2014-11-13 19:30:51 +02:00
|
|
|
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # khotkeys, kxkb, kdm
|
2021-03-02 22:08:04 +02:00
|
|
|
macro_bool_to_01(X11_Xcomposite_FOUND HAVE_XCOMPOSITE) # plasma, kwin
|
2014-11-13 19:30:51 +02:00
|
|
|
macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # many uses
|
|
|
|
macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE) # kwin
|
|
|
|
macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # klipper, kicker, kwin
|
2021-03-02 22:08:04 +02:00
|
|
|
macro_bool_to_01(X11_Xkb_FOUND HAVE_XKB) # kdm, kglobalaccel, kcontrol/keyboard
|
|
|
|
macro_bool_to_01(X11_Xinerama_FOUND HAVE_XINERAMA)
|
2014-11-13 19:30:51 +02:00
|
|
|
macro_bool_to_01(X11_Xrandr_FOUND HAVE_XRANDR) # kwin
|
|
|
|
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kcontrol/style, kicker
|
2021-03-02 22:08:04 +02:00
|
|
|
macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kcontrol/keyboard
|
|
|
|
macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # powerdevil
|
2014-11-13 19:30:51 +02:00
|
|
|
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
|
2021-03-02 22:08:04 +02:00
|
|
|
macro_bool_to_01(X11_XRes_FOUND HAVE_XRES) # ksysguard
|
2021-06-11 03:15:40 +03:00
|
|
|
macro_bool_to_01(X11_xf86vmode_FOUND HAVE_XF86VMODE) # powerdevil
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
check_function_exists(setpriority HAVE_SETPRIORITY) # kscreenlocker
|
|
|
|
|
2020-02-24 19:41:26 +00:00
|
|
|
cmake_reset_check_state()
|
|
|
|
set(CMAKE_REQUIRED_LIBRARIES ${X11_Xext_LIB})
|
2021-02-18 05:10:29 +02:00
|
|
|
set(CMAKE_REQUIRED_INCLUDES ${X11_X11_INCLUDE_PATH})
|
2020-02-24 19:41:26 +00:00
|
|
|
check_symbol_exists(DPMSCapable "X11/Xlib.h;X11/extensions/dpms.h" HAVE_DPMSCAPABLE_PROTO)
|
|
|
|
check_symbol_exists(DPMSInfo "X11/Xlib.h;X11/extensions/dpms.h" HAVE_DPMSINFO_PROTO)
|
2021-01-22 03:06:52 +02:00
|
|
|
cmake_reset_check_state()
|
2020-02-24 19:41:26 +00:00
|
|
|
|
2020-02-19 22:28:44 +02:00
|
|
|
cmake_reset_check_state()
|
2021-02-18 05:10:29 +02:00
|
|
|
set(CMAKE_REQUIRED_INCLUDES ${X11_Xrandr_INCLUDE_PATH})
|
2014-11-13 19:30:51 +02:00
|
|
|
set(CMAKE_REQUIRED_LIBRARIES ${X11_Xrandr_LIB})
|
|
|
|
check_function_exists(XRRGetScreenSizeRange XRANDR_1_2_FOUND)
|
|
|
|
macro_bool_to_01(XRANDR_1_2_FOUND HAS_RANDR_1_2)
|
|
|
|
check_function_exists(XRRGetScreenResourcesCurrent XRANDR_1_3_FOUND)
|
|
|
|
macro_bool_to_01(XRANDR_1_3_FOUND HAS_RANDR_1_3)
|
2021-01-22 03:06:52 +02:00
|
|
|
cmake_reset_check_state()
|