summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt92
-rw-r--r--config.h.core.in3
-rw-r--r--gtk/CMakeLists.txt92
-rw-r--r--gtk/config.h.gtk.in (renamed from config.h.cmake.in)9
-rw-r--r--gtk/gnome/CMakeLists.txt2
-rw-r--r--gtk/window-decorator/CMakeLists.txt2
-rw-r--r--libdecoration/CMakeLists.txt9
-rw-r--r--libdecoration/config.h.libdecoration.in4
8 files changed, 111 insertions, 102 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc634d6..b0b8bf3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,99 +56,9 @@ pkg_check_modules (LIBDECORATION REQUIRED ${DECORATION_REQUIRES})
set (COMPIZ_CFLAGS "${COMPIZ_CFLAGS} -I${Boost_INCLUDE_DIR}")
-check_pkg_module (xrender>=0.9.3 HAVE_XRENDER_0_9_3)
-
-set (USE_GTK 1 CACHE BOOL "Build gtk-window-decorator")
-set (USE_METACITY 1 CACHE BOOL "Gtk-window-decorator metacity theme support")
-set (USE_GNOME 1 CACHE BOOL "Gnome settings module")
-set (USE_GNOME_KEYBINDINGS 1 CACHE BOOL "Gnome keybindings")
-set (USE_GCONF 1 CACHE BOOL "Install GConf schemas")
-
-if (USE_GCONF)
- pkg_check_modules (GCONF gconf-2.0)
-
- find_program (GCONFTOOL_EXECUTABLE gconftool-2)
- mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
-
- if (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
- set (USE_GCONF 0)
- endif (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
-endif (USE_GCONF)
-
-if (USE_GTK)
- pkg_check_modules (GTK_WINDOW_DECORATOR
- xrender>=0.8.4
- gtk+-2.0>=2.8.0
- libwnck-1.0
- pangocairo
- )
- if (GTK_WINDOW_DECORATOR_FOUND)
- set (CMAKE_REQUIRED_FLAGS ${GTK_WINDOW_DECORATOR_CFLAGS})
- set (CMAKE_REQUIRED_LIBRARIES ${GTK_WINDOW_DECORATOR_LIBRARIES})
- check_function_exists (wnck_window_has_name HAVE_WNCK_WINDOW_HAS_NAME)
- set (CMAKE_REQUIRED_FLAGS "")
- set (CMAKE_REQUIRED_LIBRARIES "")
-
- check_pkg_module (libwnck-1.0>=2.18.1 HAVE_LIBWNCK_2_18_1)
- check_pkg_module (libwnck-1.0>=2.19.4 HAVE_LIBWNCK_2_19_4)
-
- if (USE_METACITY)
- pkg_check_modules (METACITY libmetacity-private)
- if (METACITY_FOUND)
- check_pkg_module (libmetacity-private>=2.15.21 HAVE_METACITY_2_15_21)
- check_pkg_module (libmetacity-private>=2.17.0 HAVE_METACITY_2_17_0)
- check_pkg_module (libmetacity-private>=2.23.2 HAVE_METACITY_2_23_2)
- else (METACITY_FOUND)
- set (USE_METACITY 0)
- endif (METACITY_FOUND)
- endif (USE_METACITY)
-
- if (USE_GNOME)
- pkg_check_modules (GNOME_WINDOW_SETTINGS
- gnome-window-settings-2.0
- gnome-desktop-2.0
- )
-
- if (GNOME_WINDOW_SETTINGS_FOUND)
- exec_program (${PKG_CONFIG_EXECUTABLE}
- ARGS "--variable=prefix gnome-window-settings-2.0"
- OUTPUT_VARIABLE windowsettingsdatadir
- )
- set (windowsettingsdatadir ${windowsettingsdatadir}/share)
- exec_program (${PKG_CONFIG_EXECUTABLE}
- ARGS "--variable=libdir gnome-window-settings-2.0"
- OUTPUT_VARIABLE windowsettingslibdir
- )
- else (GNOME_WINDOW_SETTINGS_FOUND)
- set (USE_GNOME 0)
- endif (GNOME_WINDOW_SETTINGS_FOUND)
- endif (USE_GNOME)
-
- if (USE_GNOME_KEYBINDINGS)
- pkg_check_modules (GNOME_KEY_BINDINGS gnome-keybindings)
- if (GNOME_KEY_BINDINGS_FOUND)
- exec_program (${PKG_CONFIG_EXECUTABLE}
- ARGS "--variable=keysdir gnome-keybindings"
- OUTPUT_VARIABLE keybindingsdir
- )
- else (GNOME_KEY_BINDINGS_FOUND)
- set (USE_GNOME_KEYBINDINGS 0)
- endif (GNOME_KEY_BINDINGS_FOUND)
- endif (USE_GNOME_KEYBINDINGS)
- else (GTK_WINDOW_DECORATOR_FOUND)
- set (USE_GTK 0)
- endif (GTK_WINDOW_DECORATOR_FOUND)
-endif (USE_GTK)
-
-if (!USE_GTK)
- set (USE_METACITY 0)
- set (USE_GNOME 0)
- set (USE_GNOME_KEYBINDINGS 0)
-endif (!USE_GTK)
-
set (_compiz_package_string "compiz ${VERSION}")
-configure_file (${compiz_SOURCE_DIR}/config.h.cmake.in ${compiz_BINARY_DIR}/config.h)
+configure_file (${compiz_SOURCE_DIR}/config.h.core.in ${compiz_BINARY_DIR}/config.h)
add_subdirectory (src)
diff --git a/config.h.core.in b/config.h.core.in
new file mode 100644
index 0000000..b6054ae
--- /dev/null
+++ b/config.h.core.in
@@ -0,0 +1,3 @@
+#define PACKAGE_STRING ${_compiz_package_string}
+
+#define GETTEXT_PACKAGE "${GETTEXT_PACKAGE}" \ No newline at end of file
diff --git a/gtk/CMakeLists.txt b/gtk/CMakeLists.txt
index 3d2bd67..1705a1b 100644
--- a/gtk/CMakeLists.txt
+++ b/gtk/CMakeLists.txt
@@ -1,3 +1,95 @@
+set (USE_GTK 1 CACHE BOOL "Build gtk-window-decorator")
+set (USE_METACITY 1 CACHE BOOL "Gtk-window-decorator metacity theme support")
+set (USE_GNOME 1 CACHE BOOL "Gnome settings module")
+set (USE_GNOME_KEYBINDINGS 1 CACHE BOOL "Gnome keybindings")
+set (USE_GCONF 1 CACHE BOOL "Install GConf schemas")
+
+if (USE_GCONF)
+ pkg_check_modules (GCONF gconf-2.0)
+
+ find_program (GCONFTOOL_EXECUTABLE gconftool-2)
+ mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
+
+ if (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
+ set (USE_GCONF 0)
+ endif (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
+endif (USE_GCONF)
+
+if (USE_GTK)
+ pkg_check_modules (GTK_WINDOW_DECORATOR
+ xrender>=0.8.4
+ gtk+-2.0>=2.8.0
+ libwnck-1.0
+ pangocairo
+ )
+ if (GTK_WINDOW_DECORATOR_FOUND)
+ set (CMAKE_REQUIRED_FLAGS ${GTK_WINDOW_DECORATOR_CFLAGS})
+ set (CMAKE_REQUIRED_LIBRARIES ${GTK_WINDOW_DECORATOR_LIBRARIES})
+ check_function_exists (wnck_window_has_name HAVE_WNCK_WINDOW_HAS_NAME)
+ set (CMAKE_REQUIRED_FLAGS "")
+ set (CMAKE_REQUIRED_LIBRARIES "")
+
+ check_pkg_module (libwnck-1.0>=2.18.1 HAVE_LIBWNCK_2_18_1)
+ check_pkg_module (libwnck-1.0>=2.19.4 HAVE_LIBWNCK_2_19_4)
+
+ if (USE_METACITY)
+ pkg_check_modules (METACITY libmetacity-private)
+ if (METACITY_FOUND)
+ check_pkg_module (libmetacity-private>=2.15.21 HAVE_METACITY_2_15_21)
+ check_pkg_module (libmetacity-private>=2.17.0 HAVE_METACITY_2_17_0)
+ check_pkg_module (libmetacity-private>=2.23.2 HAVE_METACITY_2_23_2)
+ else (METACITY_FOUND)
+ set (USE_METACITY 0)
+ endif (METACITY_FOUND)
+ endif (USE_METACITY)
+
+ if (USE_GNOME)
+ pkg_check_modules (GNOME_WINDOW_SETTINGS
+ gnome-window-settings-2.0
+ gnome-desktop-2.0
+ )
+
+ if (GNOME_WINDOW_SETTINGS_FOUND)
+ exec_program (${PKG_CONFIG_EXECUTABLE}
+ ARGS "--variable=prefix gnome-window-settings-2.0"
+ OUTPUT_VARIABLE windowsettingsdatadir
+ )
+ set (windowsettingsdatadir ${windowsettingsdatadir}/share)
+ exec_program (${PKG_CONFIG_EXECUTABLE}
+ ARGS "--variable=libdir gnome-window-settings-2.0"
+ OUTPUT_VARIABLE windowsettingslibdir
+ )
+ else (GNOME_WINDOW_SETTINGS_FOUND)
+ set (USE_GNOME 0)
+ endif (GNOME_WINDOW_SETTINGS_FOUND)
+ endif (USE_GNOME)
+
+ if (USE_GNOME_KEYBINDINGS)
+ pkg_check_modules (GNOME_KEY_BINDINGS gnome-keybindings)
+ if (GNOME_KEY_BINDINGS_FOUND)
+ exec_program (${PKG_CONFIG_EXECUTABLE}
+ ARGS "--variable=keysdir gnome-keybindings"
+ OUTPUT_VARIABLE keybindingsdir
+ )
+ else (GNOME_KEY_BINDINGS_FOUND)
+ set (USE_GNOME_KEYBINDINGS 0)
+ endif (GNOME_KEY_BINDINGS_FOUND)
+ endif (USE_GNOME_KEYBINDINGS)
+ else (GTK_WINDOW_DECORATOR_FOUND)
+ set (USE_GTK 0)
+ endif (GTK_WINDOW_DECORATOR_FOUND)
+endif (USE_GTK)
+
+if (!USE_GTK)
+ set (USE_METACITY 0)
+ set (USE_GNOME 0)
+ set (USE_GNOME_KEYBINDINGS 0)
+endif (!USE_GTK)
+
+configure_file (
+ ${CMAKE_CURRENT_SOURCE_DIR}/config.h.gtk.in
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+)
add_subdirectory (window-decorator)
add_subdirectory (gnome)
diff --git a/config.h.cmake.in b/gtk/config.h.gtk.in
index 59a990b..6a204ab 100644
--- a/config.h.cmake.in
+++ b/gtk/config.h.gtk.in
@@ -1,9 +1,6 @@
/* Define to 1 if you have the `wnck_window_has_name' function. */
#cmakedefine HAVE_WNCK_WINDOW_HAS_NAME 1
-/* Define to 1 if xrender version >= 0.9.3 */
-#cmakedefine HAVE_XRENDER_0_9_3 1
-
/* Define to 1 if libwnck version >= 2_18_1 */
#cmakedefine HAVE_LIBWNCK_2_18_1 1
@@ -19,8 +16,4 @@
/* Define to 1 if metacity version >= 2.23.2 */
#cmakedefine HAVE_METACITY_2_23_2 1
-#define DECOR_INTERFACE_VERSION ${DECOR_INTERFACE_VERSION}
-
-#define PACKAGE_STRING ${_compiz_package_string}
-
-#define GETTEXT_PACKAGE "${GETTEXT_PACKAGE}" \ No newline at end of file
+#define GETTEXT_PACKAGE "${GETTEXT_PACKAGE}"
diff --git a/gtk/gnome/CMakeLists.txt b/gtk/gnome/CMakeLists.txt
index c2b0559..daf6d56 100644
--- a/gtk/gnome/CMakeLists.txt
+++ b/gtk/gnome/CMakeLists.txt
@@ -2,7 +2,7 @@
if (USE_GNOME)
include_directories (
- ${compiz_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/gtk
${GNOME_WINDOW_SETTINGS_INCLUDE_DIRS}
)
diff --git a/gtk/window-decorator/CMakeLists.txt b/gtk/window-decorator/CMakeLists.txt
index 9169f66..77f8392 100644
--- a/gtk/window-decorator/CMakeLists.txt
+++ b/gtk/window-decorator/CMakeLists.txt
@@ -2,7 +2,7 @@ if (USE_GTK)
include_directories (
${compiz_SOURCE_DIR}/include
- ${compiz_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/gtk
${GTK_WINDOW_DECORATOR_INCLUDE_DIRS}
${METACITY_INCLUDE_DIRS}
${GCONF_INCLUDE_DIRS}
diff --git a/libdecoration/CMakeLists.txt b/libdecoration/CMakeLists.txt
index a88d85e..07daf56 100644
--- a/libdecoration/CMakeLists.txt
+++ b/libdecoration/CMakeLists.txt
@@ -1,6 +1,13 @@
+check_pkg_module (xrender>=0.9.3 HAVE_XRENDER_0_9_3)
+
+configure_file (
+ ${CMAKE_CURRENT_SOURCE_DIR}/config.h.libdecoration.in
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+)
+
include_directories (
${compiz_SOURCE_DIR}/include
- ${compiz_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${LIBDECORATION_INCLUDE_DIRS}
)
diff --git a/libdecoration/config.h.libdecoration.in b/libdecoration/config.h.libdecoration.in
new file mode 100644
index 0000000..b0703da
--- /dev/null
+++ b/libdecoration/config.h.libdecoration.in
@@ -0,0 +1,4 @@
+/* Define to 1 if xrender version >= 0.9.3 */
+#cmakedefine HAVE_XRENDER_0_9_3 1
+
+#define DECOR_INTERFACE_VERSION ${DECOR_INTERFACE_VERSION}