Skip to content

Commit e2f5b3c

Browse files
author
Ahmad Samir
committed
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
1 parent 62b65a5 commit e2f5b3c

File tree

5 files changed

+3
-224
lines changed

5 files changed

+3
-224
lines changed

ConfigureChecks.cmake

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} )
2-
include(CheckTypeSize)
3-
include(FindPkgConfig)
4-
5-
# find_package(XKB) # kxkb, kdm
62

73
set(KWIN_BIN "kwin_x11" CACHE STRING "Name of the KWin binary")
84

@@ -12,47 +8,11 @@ if (NOT some_x_program)
128
message("Warning: Could not determine X binary directory. Assuming /usr/bin.")
139
endif (NOT some_x_program)
1410
get_filename_component(proto_xbindir "${some_x_program}" PATH)
15-
get_filename_component(XBINDIR "${proto_xbindir}" ABSOLUTE)
16-
get_filename_component(xrootdir "${XBINDIR}" PATH)
17-
set(XLIBDIR "${xrootdir}/lib/X11")
18-
19-
check_function_exists(statvfs HAVE_STATVFS)
2011

2112
check_include_files(limits.h HAVE_LIMITS_H)
2213
check_include_files(sys/time.h HAVE_SYS_TIME_H) # ksmserver, ksplashml, sftp
23-
check_include_files(stdint.h HAVE_STDINT_H) # kcontrol/kfontinst
24-
check_include_files("sys/stat.h;sys/vfs.h" HAVE_SYS_VFS_H) # statvfs for plasma/solid
25-
check_include_files("sys/stat.h;sys/statvfs.h" HAVE_SYS_STATVFS_H) # statvfs for plasma/solid
26-
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
27-
check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H)
28-
check_include_files("sys/types.h;sys/statfs.h" HAVE_SYS_STATFS_H)
2914
check_include_files(unistd.h HAVE_UNISTD_H)
30-
check_include_files(malloc.h HAVE_MALLOC_H)
31-
check_function_exists(statfs HAVE_STATFS)
32-
macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst}
33-
macro_bool_to_01(OPENGL_FOUND HAVE_OPENGL) # kwin
34-
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # kwin, ksplash
35-
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # khotkeys, kxkb, kdm
36-
macro_bool_to_01(X11_Xcomposite_FOUND HAVE_XCOMPOSITE) # kicker, kwin
37-
macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # many uses
38-
macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE) # kwin
39-
macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # klipper, kicker, kwin
40-
macro_bool_to_01(X11_Xinerama_FOUND HAVE_XINERAMA)
41-
macro_bool_to_01(X11_Xrandr_FOUND HAVE_XRANDR) # kwin
42-
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kcontrol/style, kicker
43-
macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kdesktop and kcontrol/lock
44-
macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # kdesktop
45-
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
46-
47-
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
48-
check_type_size("struct ucred" STRUCT_UCRED) # kio_fonts
49-
50-
check_function_exists(getpeereid HAVE_GETPEEREID) # kdesu
51-
check_function_exists(setpriority HAVE_SETPRIORITY) # kscreenlocker
5215

53-
set(CMAKE_REQUIRED_INCLUDES ${X11_Xrandr_INCLUDE_PATH}/Xrandr.h)
54-
set(CMAKE_REQUIRED_LIBRARIES ${X11_Xrandr_LIB})
55-
check_function_exists(XRRGetScreenSizeRange XRANDR_1_2_FOUND)
56-
macro_bool_to_01(XRANDR_1_2_FOUND HAS_RANDR_1_2)
57-
check_function_exists(XRRGetScreenResourcesCurrent XRANDR_1_3_FOUND)
58-
macro_bool_to_01(XRANDR_1_3_FOUND HAS_RANDR_1_3)
16+
set(HAVE_FONTCONFIG ${FONTCONFIG_FOUND}) # kcms/{fonts,kfontinst}
17+
set(HAVE_XCURSOR ${X11_Xcursor_FOUND}) # many uses
18+
set(HAVE_XFIXES ${X11_Xfixes_FOUND}) # klipper, kicker

config-X11.h.cmake

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,8 @@
1-
/* Define if you have the XRandR extension */
2-
#cmakedefine HAVE_XRANDR 1
3-
4-
/* Define if you have the XDamage extension */
5-
#cmakedefine HAVE_XDAMAGE 1
6-
7-
/* Define if you have the XKB extension */
8-
#cmakedefine HAVE_XKB 1
9-
10-
/* Define if you have the Xinerama extension */
11-
#cmakedefine HAVE_XINERAMA 1
12-
13-
/* Define if you have the XSHM (MIT SHM) extension */
14-
#cmakedefine HAVE_XSHM 1
15-
16-
/* Define if you have the XComposite extension */
17-
#cmakedefine HAVE_XCOMPOSITE 1
18-
191
/* Define to 1 if you have Xcursor */
202
#cmakedefine HAVE_XCURSOR 1
213

22-
/* Define if you have the xf86misc extension */
23-
#cmakedefine HAVE_XF86MISC 1
24-
254
/* Define if you have the XFixes extension */
265
#cmakedefine HAVE_XFIXES 1
276

28-
/* Define if you have the XTest extension */
29-
#cmakedefine HAVE_XTEST 1
30-
31-
/* Define if your system has XRender support */
32-
#cmakedefine HAVE_XRENDER 1
33-
34-
/* Define if you have OpenGL */
35-
#cmakedefine HAVE_OPENGL 1
36-
37-
/* Define if you have the XSync extension */
38-
#cmakedefine HAVE_XSYNC 1
39-
40-
/* Define if you have XRandR 1.3 */
41-
#cmakedefine HAS_RANDR_1_3 1
42-
437
/* Define if you have X11 at all */
448
#cmakedefine01 HAVE_X11

config-workspace.h.cmake

Lines changed: 0 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,14 @@
11
/* config-workspace.h. Generated by cmake from config-workspace.h.cmake */
22

3-
#cmakedefine HAVE_QIMAGEBLITZ
4-
5-
/* Define if you have DPMS support */
6-
#cmakedefine HAVE_DPMS 1
7-
8-
/* Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h> */
9-
#cmakedefine HAVE_DPMSCAPABLE_PROTO 1
10-
11-
/* Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h> */
12-
#cmakedefine HAVE_DPMSINFO_PROTO 1
13-
143
/* Defines if your system has the libfontconfig library */
154
#cmakedefine HAVE_FONTCONFIG 1
165

17-
/* Define if you have gethostname */
18-
#cmakedefine HAVE_GETHOSTNAME 1
19-
20-
/* Define if you have the gethostname prototype */
21-
#cmakedefine HAVE_GETHOSTNAME_PROTO 1
22-
23-
/* Define to 1 if you have the `getpeereid' function. */
24-
#cmakedefine HAVE_GETPEEREID 1
25-
26-
/* Defines if you have Solaris' libkstat */
27-
/* #undef HAVE_KSTAT */
28-
29-
/* Define if you have long long as datatype */
30-
#cmakedefine HAVE_LONG_LONG 1
31-
32-
/* Define to 1 if you have the `nice' function. */
33-
#cmakedefine HAVE_NICE 1
34-
35-
/* Define to 1 if you have the <sasl.h> header file. */
36-
#cmakedefine HAVE_SASL_H 1
37-
38-
/* Define to 1 if you have the <sasl/sasl.h> header file. */
39-
#cmakedefine HAVE_SASL_SASL_H 1
40-
41-
/* Define to 1 if you have the `setpriority' function. */
42-
#cmakedefine HAVE_SETPRIORITY 1
43-
44-
/* Define to 1 if you have the `sigaction' function. */
45-
#cmakedefine HAVE_SIGACTION 1
46-
47-
/* Define to 1 if you have the `sigset' function. */
48-
#cmakedefine HAVE_SIGSET 1
49-
50-
/* Define to 1 if you have statvfs */
51-
#cmakedefine HAVE_STATVFS 1
52-
53-
/* Define to 1 if you have the <string.h> header file. */
54-
#cmakedefine HAVE_STRING_H 1
55-
56-
/* Define if you have the struct ucred */
57-
#cmakedefine HAVE_STRUCT_UCRED 1
58-
59-
/* Define to 1 if you have the <sys/loadavg.h> header file. */
60-
#cmakedefine HAVE_SYS_LOADAVG_H 1
61-
62-
/* Define to 1 if you have the <sys/mount.h> header file. */
63-
#cmakedefine HAVE_SYS_MOUNT_H 1
64-
65-
/* Define to 1 if you have the <sys/param.h> header file. */
66-
#cmakedefine HAVE_SYS_PARAM_H 1
67-
68-
/* Define to 1 if you have the <sys/statfs.h> header file. */
69-
#cmakedefine HAVE_SYS_STATFS_H 1
70-
71-
/* Define to 1 if you have the <sys/statvfs.h> header file. */
72-
#cmakedefine HAVE_SYS_STATVFS_H 1
73-
74-
/* Define to 1 if you have statfs(). */
75-
#cmakedefine HAVE_STATFS 1
76-
77-
/* Define to 1 if you have the <sys/select.h> header file. */
78-
#cmakedefine HAVE_SYS_SELECT_H 1
79-
80-
/* Define to 1 if you have the <sys/socket.h> header file. */
81-
#cmakedefine HAVE_SYS_SOCKET_H 1
82-
836
/* Define to 1 if you have the <sys/time.h> header file. */
847
#cmakedefine HAVE_SYS_TIME_H 1
858

86-
/* Define to 1 if you have the <sys/types.h> header file. */
87-
#cmakedefine HAVE_SYS_TYPES_H 1
88-
89-
/* Define to 1 if you have the <sys/vfs.h> header file. */
90-
#cmakedefine HAVE_SYS_VFS_H 1
91-
92-
/* Define to 1 if you have the <sys/wait.h> header file. */
93-
#cmakedefine HAVE_SYS_WAIT_H 1
94-
95-
/* Define to 1 if you have the <unistd.h> header file. */
96-
#cmakedefine HAVE_UNISTD_H 1
97-
98-
/* Define to 1 if you have the <stdint.h> header file. */
99-
#cmakedefine HAVE_STDINT_H 1
100-
101-
/* Define to 1 if you have the <malloc.h> header file. */
102-
#cmakedefine HAVE_MALLOC_H 1
103-
104-
/* Define if you have unsetenv */
105-
#cmakedefine HAVE_UNSETENV 1
106-
107-
/* Define if you have the unsetenv prototype */
108-
#cmakedefine HAVE_UNSETENV_PROTO 1
109-
110-
/* Define if you have usleep */
111-
#cmakedefine HAVE_USLEEP 1
112-
113-
/* Define if you have the usleep prototype */
114-
#cmakedefine HAVE_USLEEP_PROTO 1
115-
116-
/* Define to 1 if you have the `vsnprintf' function. */
117-
#cmakedefine HAVE_VSNPRINTF 1
118-
119-
/* KDE's default home directory */
120-
#cmakedefine KDE_DEFAULT_HOME "${KDE_DEFAULT_HOME}"
121-
1229
/* KDE's binaries directory */
12310
#define KDE_BINDIR "${KDE_INSTALL_BINDIR}"
12411

125-
/* KDE's configuration directory */
126-
#define KDE_CONFDIR "${KDE_INSTALL_CONFDIR}"
127-
128-
/* KDE's static data directory */
129-
#define KDE_DATADIR "${KDE_INSTALL_DATADIR}"
130-
131-
/* Define where your java executable is */
132-
#undef PATH_JAVA
133-
134-
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
135-
#cmakedefine TIME_WITH_SYS_TIME 1
136-
137-
/* X binaries directory */
138-
#cmakedefine XBINDIR "${XBINDIR}"
139-
140-
/* X libraries directory */
141-
#cmakedefine XLIBDIR "${XLIBDIR}"
142-
143-
/* Number of bits in a file offset, on hosts where this is settable. */
144-
#define _FILE_OFFSET_BITS 64
145-
146-
/*
147-
* On HP-UX, the declaration of vsnprintf() is needed every time !
148-
*/
149-
150-
/* type to use in place of socklen_t if not defined */
151-
#define kde_socklen_t socklen_t
152-
15312
/** place where plasma-frameworks things are installed */
15413
#define PLASMA_RELATIVE_DATA_INSTALL_DIR "@PLASMA_RELATIVE_DATA_INSTALL_DIR@"
15514

ksmserver/config-ksmserver.h.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
/* Define to 1 if you have the `_IceTransNoListen' function. */
22
#cmakedefine HAVE__ICETRANSNOLISTEN 1
33
#define LOGOUT_GREETER_BIN "${CMAKE_INSTALL_FULL_LIBEXECDIR}/ksmserver-logout-greeter"
4-
5-
#define KWIN_BIN "${KWIN_BIN}"

shell/config-plasma.h.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
#cmakedefine01 HAVE_X11
2-
#cmakedefine01 HAVE_GLX
3-
#cmakedefine01 HAVE_EGL

0 commit comments

Comments
 (0)