Commit e2f5b3c8 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Clean up CMake variables

- Port away from cmake macro macro_bool_to_01, which was being used from
the copy of that macro that KDELibs4Support has
- Clean up redundant CMake variables
parent 62b65a54
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} )
include(CheckTypeSize)
include(FindPkgConfig)
# find_package(XKB) # kxkb, kdm
set(KWIN_BIN "kwin_x11" CACHE STRING "Name of the KWin binary")
......@@ -12,47 +8,11 @@ if (NOT some_x_program)
message("Warning: Could not determine X binary directory. Assuming /usr/bin.")
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")
check_function_exists(statvfs HAVE_STATVFS)
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("sys/stat.h;sys/vfs.h" HAVE_SYS_VFS_H) # statvfs for plasma/solid
check_include_files("sys/stat.h;sys/statvfs.h" HAVE_SYS_STATVFS_H) # statvfs for plasma/solid
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H)
check_include_files("sys/types.h;sys/statfs.h" HAVE_SYS_STATFS_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(malloc.h HAVE_MALLOC_H)
check_function_exists(statfs HAVE_STATFS)
macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst}
macro_bool_to_01(OPENGL_FOUND HAVE_OPENGL) # kwin
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # kwin, ksplash
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # khotkeys, kxkb, kdm
macro_bool_to_01(X11_Xcomposite_FOUND HAVE_XCOMPOSITE) # kicker, kwin
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
macro_bool_to_01(X11_Xinerama_FOUND HAVE_XINERAMA)
macro_bool_to_01(X11_Xrandr_FOUND HAVE_XRANDR) # kwin
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kcontrol/style, kicker
macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kdesktop and kcontrol/lock
macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # kdesktop
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
check_type_size("struct ucred" STRUCT_UCRED) # kio_fonts
check_function_exists(getpeereid HAVE_GETPEEREID) # kdesu
check_function_exists(setpriority HAVE_SETPRIORITY) # kscreenlocker
set(CMAKE_REQUIRED_INCLUDES ${X11_Xrandr_INCLUDE_PATH}/Xrandr.h)
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)
set(HAVE_FONTCONFIG ${FONTCONFIG_FOUND}) # kcms/{fonts,kfontinst}
set(HAVE_XCURSOR ${X11_Xcursor_FOUND}) # many uses
set(HAVE_XFIXES ${X11_Xfixes_FOUND}) # klipper, kicker
/* Define if you have the XRandR extension */
#cmakedefine HAVE_XRANDR 1
/* Define if you have the XDamage extension */
#cmakedefine HAVE_XDAMAGE 1
/* Define if you have the XKB extension */
#cmakedefine HAVE_XKB 1
/* Define if you have the Xinerama extension */
#cmakedefine HAVE_XINERAMA 1
/* Define if you have the XSHM (MIT SHM) extension */
#cmakedefine HAVE_XSHM 1
/* Define if you have the XComposite extension */
#cmakedefine HAVE_XCOMPOSITE 1
/* Define to 1 if you have Xcursor */
#cmakedefine HAVE_XCURSOR 1
/* Define if you have the xf86misc extension */
#cmakedefine HAVE_XF86MISC 1
/* Define if you have the XFixes extension */
#cmakedefine HAVE_XFIXES 1
/* Define if you have the XTest extension */
#cmakedefine HAVE_XTEST 1
/* Define if your system has XRender support */
#cmakedefine HAVE_XRENDER 1
/* Define if you have OpenGL */
#cmakedefine HAVE_OPENGL 1
/* Define if you have the XSync extension */
#cmakedefine HAVE_XSYNC 1
/* Define if you have XRandR 1.3 */
#cmakedefine HAS_RANDR_1_3 1
/* Define if you have X11 at all */
#cmakedefine01 HAVE_X11
/* config-workspace.h. Generated by cmake from config-workspace.h.cmake */
#cmakedefine HAVE_QIMAGEBLITZ
/* Define if you have DPMS support */
#cmakedefine HAVE_DPMS 1
/* Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h> */
#cmakedefine HAVE_DPMSCAPABLE_PROTO 1
/* Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h> */
#cmakedefine HAVE_DPMSINFO_PROTO 1
/* Defines if your system has the libfontconfig library */
#cmakedefine HAVE_FONTCONFIG 1
/* Define if you have gethostname */
#cmakedefine HAVE_GETHOSTNAME 1
/* Define if you have the gethostname prototype */
#cmakedefine HAVE_GETHOSTNAME_PROTO 1
/* Define to 1 if you have the `getpeereid' function. */
#cmakedefine HAVE_GETPEEREID 1
/* Defines if you have Solaris' libkstat */
/* #undef HAVE_KSTAT */
/* Define if you have long long as datatype */
#cmakedefine HAVE_LONG_LONG 1
/* Define to 1 if you have the `nice' function. */
#cmakedefine HAVE_NICE 1
/* Define to 1 if you have the <sasl.h> header file. */
#cmakedefine HAVE_SASL_H 1
/* Define to 1 if you have the <sasl/sasl.h> header file. */
#cmakedefine HAVE_SASL_SASL_H 1
/* Define to 1 if you have the `setpriority' function. */
#cmakedefine HAVE_SETPRIORITY 1
/* Define to 1 if you have the `sigaction' function. */
#cmakedefine HAVE_SIGACTION 1
/* Define to 1 if you have the `sigset' function. */
#cmakedefine HAVE_SIGSET 1
/* Define to 1 if you have statvfs */
#cmakedefine HAVE_STATVFS 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define if you have the struct ucred */
#cmakedefine HAVE_STRUCT_UCRED 1
/* Define to 1 if you have the <sys/loadavg.h> header file. */
#cmakedefine HAVE_SYS_LOADAVG_H 1
/* Define to 1 if you have the <sys/mount.h> header file. */
#cmakedefine HAVE_SYS_MOUNT_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#cmakedefine HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/statfs.h> header file. */
#cmakedefine HAVE_SYS_STATFS_H 1
/* Define to 1 if you have the <sys/statvfs.h> header file. */
#cmakedefine HAVE_SYS_STATVFS_H 1
/* Define to 1 if you have statfs(). */
#cmakedefine HAVE_STATFS 1
/* Define to 1 if you have the <sys/select.h> header file. */
#cmakedefine HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/vfs.h> header file. */
#cmakedefine HAVE_SYS_VFS_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#cmakedefine HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <malloc.h> header file. */
#cmakedefine HAVE_MALLOC_H 1
/* Define if you have unsetenv */
#cmakedefine HAVE_UNSETENV 1
/* Define if you have the unsetenv prototype */
#cmakedefine HAVE_UNSETENV_PROTO 1
/* Define if you have usleep */
#cmakedefine HAVE_USLEEP 1
/* Define if you have the usleep prototype */
#cmakedefine HAVE_USLEEP_PROTO 1
/* Define to 1 if you have the `vsnprintf' function. */
#cmakedefine HAVE_VSNPRINTF 1
/* KDE's default home directory */
#cmakedefine KDE_DEFAULT_HOME "${KDE_DEFAULT_HOME}"
/* KDE's binaries directory */
#define KDE_BINDIR "${KDE_INSTALL_BINDIR}"
/* KDE's configuration directory */
#define KDE_CONFDIR "${KDE_INSTALL_CONFDIR}"
/* KDE's static data directory */
#define KDE_DATADIR "${KDE_INSTALL_DATADIR}"
/* Define where your java executable is */
#undef PATH_JAVA
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#cmakedefine TIME_WITH_SYS_TIME 1
/* X binaries directory */
#cmakedefine XBINDIR "${XBINDIR}"
/* X libraries directory */
#cmakedefine XLIBDIR "${XLIBDIR}"
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/*
* On HP-UX, the declaration of vsnprintf() is needed every time !
*/
/* type to use in place of socklen_t if not defined */
#define kde_socklen_t socklen_t
/** place where plasma-frameworks things are installed */
#define PLASMA_RELATIVE_DATA_INSTALL_DIR "@PLASMA_RELATIVE_DATA_INSTALL_DIR@"
......
/* Define to 1 if you have the `_IceTransNoListen' function. */
#cmakedefine HAVE__ICETRANSNOLISTEN 1
#define LOGOUT_GREETER_BIN "${CMAKE_INSTALL_FULL_LIBEXECDIR}/ksmserver-logout-greeter"
#define KWIN_BIN "${KWIN_BIN}"
#cmakedefine01 HAVE_X11
#cmakedefine01 HAVE_GLX
#cmakedefine01 HAVE_EGL
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment