5 macro_optional_find_package(XKB) # kxkb, kdm
8 set(KDE4_COMMON_PAM_SERVICE "kde" CACHE STRING "The PAM service to use unless overridden for a particular app.")
10 macro(define_pam_service APP)
11 string(TOUPPER ${APP}_PAM_SERVICE var)
13 set(${cvar} "${KDE4_COMMON_PAM_SERVICE}" CACHE STRING "The PAM service for ${APP}.")
14 mark_as_advanced(${cvar})
15 set(${var} "\"${${cvar}}\"")
16 endmacro(define_pam_service)
18 macro(install_pam_service APP)
19 string(TOUPPER KDE4_${APP}_PAM_SERVICE cvar)
21 set(DESTDIR_VALUE \"\$ENV{DESTDIR}\")
22 if (NOT DESTDIR_VALUE)
23 exec_program(\"${CMAKE_SOURCE_DIR}/workspace/mkpamserv\" ARGS ${${cvar}} RETURN_VALUE ret)
25 exec_program(\"${CMAKE_SOURCE_DIR}/workspace/mkpamserv\" ARGS -P ${${cvar}}-np)
27 endif (NOT DESTDIR_VALUE)
29 endmacro(install_pam_service)
31 define_pam_service(KDM)
32 define_pam_service(kcheckpass)
33 define_pam_service(kscreensaver)
37 macro(install_pam_service APP)
38 endmacro(install_pam_service)
42 find_program(some_x_program NAMES iceauth xrdb xterm)
43 if (NOT some_x_program)
44 set(some_x_program /usr/bin/xrdb)
45 message("Warning: Could not determine X binary directory. Assuming /usr/bin.")
46 endif (NOT some_x_program)
47 get_filename_component(proto_xbindir "${some_x_program}" PATH)
48 get_filename_component(XBINDIR "${proto_xbindir}" ABSOLUTE)
49 get_filename_component(xrootdir "${XBINDIR}" PATH)
50 set(XLIBDIR "${xrootdir}/lib/X11")
52 check_function_exists(getpassphrase HAVE_GETPASSPHRASE)
53 check_function_exists(vsyslog HAVE_VSYSLOG)
54 check_function_exists(statvfs HAVE_STATVFS)
56 check_include_files(limits.h HAVE_LIMITS_H)
57 check_include_files(sys/time.h HAVE_SYS_TIME_H) # ksmserver, ksplashml, sftp
58 check_include_files(stdint.h HAVE_STDINT_H) # kcontrol/kfontinst
59 check_include_files("sys/stat.h;sys/vfs.h" HAVE_SYS_VFS_H) # statvfs for plasma/solid
60 check_include_files("sys/stat.h;sys/statvfs.h" HAVE_SYS_STATVFS_H) # statvfs for plasma/solid
61 check_include_files(sys/param.h HAVE_SYS_PARAM_H)
62 check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H)
63 check_include_files("sys/types.h;sys/statfs.h" HAVE_SYS_STATFS_H)
64 check_function_exists(statfs HAVE_STATFS)
65 macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst}
66 macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE) # kcontrol/fonts
67 macro_bool_to_01(OPENGL_FOUND HAVE_OPENGL) # kwin
68 macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # kwin, ksplash
69 macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # khotkeys, kxkb, kdm
70 macro_bool_to_01(X11_Xcomposite_FOUND HAVE_XCOMPOSITE) # kicker, kwin
71 macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # many uses
72 macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE) # kwin
73 macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # klipper, kicker, kwin
74 macro_bool_to_01(X11_Xinerama_FOUND HAVE_XINERAMA)
75 macro_bool_to_01(X11_Xrandr_FOUND HAVE_XRANDR) # kwin
76 macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kcontrol/style, kicker
77 macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kdesktop and kcontrol/lock
78 macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # kdesktop
79 macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
81 set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
82 check_type_size("struct ucred" STRUCT_UCRED) # kio_fonts
84 check_function_exists(getpeereid HAVE_GETPEEREID) # kdesu
86 pkg_check_modules (XRANDR_1_2 xrandr>=1.2)
87 macro_bool_to_01(XRANDR_1_2_FOUND HAS_RANDR_1_2)