summaryrefslogtreecommitdiff
diff options
-rw-r--r--plugins/networkarearegion/CMakeLists.txt11
-rw-r--r--plugins/unity-mt-grab-handles/CMakeLists.txt11
-rw-r--r--plugins/unitydialog/CMakeLists.txt10
-rw-r--r--plugins/unityshell/CMakeLists.txt11
4 files changed, 43 insertions, 0 deletions
diff --git a/plugins/networkarearegion/CMakeLists.txt b/plugins/networkarearegion/CMakeLists.txt
index b6adead03..ea1ece005 100644
--- a/plugins/networkarearegion/CMakeLists.txt
+++ b/plugins/networkarearegion/CMakeLists.txt
@@ -2,4 +2,15 @@ find_package (Compiz REQUIRED)
include (CompizPlugin)
+# Guard against Compiz altering global state.
+# https://bugs.launchpad.net/compiz/+bug/1096807
+if(CMAKE_BUILD_TYPE STREQUAL "")
+ set(revert_compiz TRUE)
+endif()
+
compiz_plugin (networkarearegion)
+
+if(revert_compiz)
+ set (CMAKE_BUILD_TYPE "" CACHE STRING "Build type (Debug/Release/RelWithDebInfo/MinSizeRe)" FORCE)
+endif()
+
diff --git a/plugins/unity-mt-grab-handles/CMakeLists.txt b/plugins/unity-mt-grab-handles/CMakeLists.txt
index a9c7c694b..ec13c9f0d 100644
--- a/plugins/unity-mt-grab-handles/CMakeLists.txt
+++ b/plugins/unity-mt-grab-handles/CMakeLists.txt
@@ -2,4 +2,15 @@ find_package (Compiz REQUIRED)
include (CompizPlugin)
+# Guard against Compiz altering global state.
+# https://bugs.launchpad.net/compiz/+bug/1096807
+if(CMAKE_BUILD_TYPE STREQUAL "")
+ set(revert_compiz TRUE)
+endif()
+
compiz_plugin (unitymtgrabhandles PKGDEPS nux-4.0>=4.0.0 PLUGINDEPS composite opengl CFLAGSADD -std=c++0x)
+
+if(revert_compiz)
+ set (CMAKE_BUILD_TYPE "" CACHE STRING "Build type (Debug/Release/RelWithDebInfo/MinSizeRe)" FORCE)
+endif()
+
diff --git a/plugins/unitydialog/CMakeLists.txt b/plugins/unitydialog/CMakeLists.txt
index 79b07758b..d6bedcd4a 100644
--- a/plugins/unitydialog/CMakeLists.txt
+++ b/plugins/unitydialog/CMakeLists.txt
@@ -2,5 +2,15 @@ find_package (Compiz REQUIRED)
include (CompizPlugin)
+# Guard against Compiz altering global state.
+# https://bugs.launchpad.net/compiz/+bug/1096807
+if(CMAKE_BUILD_TYPE STREQUAL "")
+ set(revert_compiz TRUE)
+endif()
+
compiz_plugin (unitydialog PLUGINDEPS composite opengl PKGDEPS cairo cairo-xlib-xrender gtk+-3.0)
+if(revert_compiz)
+ set (CMAKE_BUILD_TYPE "" CACHE STRING "Build type (Debug/Release/RelWithDebInfo/MinSizeRe)" FORCE)
+endif()
+
diff --git a/plugins/unityshell/CMakeLists.txt b/plugins/unityshell/CMakeLists.txt
index d4d170ae2..abf50a3b0 100644
--- a/plugins/unityshell/CMakeLists.txt
+++ b/plugins/unityshell/CMakeLists.txt
@@ -4,12 +4,23 @@ include (CompizPlugin)
set (COMPIZ_PLUGIN_INSTALL_TYPE "package")
+# Guard against Compiz altering global state.
+# https://bugs.launchpad.net/compiz/+bug/1096807
+if(CMAKE_BUILD_TYPE STREQUAL "")
+ set(revert_compiz TRUE)
+endif()
+
compiz_plugin (unityshell
PKGDEPS ${UNITY_PLUGIN_DEPS}
PLUGINDEPS composite opengl compiztoolbox scale
CFLAGSADD "-DINSTALLPREFIX='\"${CMAKE_INSTALL_PREFIX}\"' -DPKGDATADIR='\"${PKGDATADIR}\"' -I${CMAKE_BINARY_DIR} -I${CMAKE_SOURCE_DIR} ${BOOT_LOGGER_FLAG} -DGETTEXT_PACKAGE='\"unity\"' ${MAINTAINER_CXXFLAGS} -I${CMAKE_SOURCE_DIR}/dash/ -I${CMAKE_SOURCE_DIR}/launcher/ -I${CMAKE_SOURCE_DIR}/hud/ -I${CMAKE_SOURCE_DIR}/panel/ -I${CMAKE_SOURCE_DIR}/shortcuts/ -I${CMAKE_SOURCE_DIR}/unity-shared/"
LIBDIRS "${CMAKE_BINARY_DIR}/UnityCore"
)
+
+if(revert_compiz)
+ set (CMAKE_BUILD_TYPE "" CACHE STRING "Build type (Debug/Release/RelWithDebInfo/MinSizeRe)" FORCE)
+endif()
+
add_dependencies(unityshell unity-core-${UNITY_API_VERSION} dash-lib launcher-lib switcher-lib hud-lib panel-lib shortcuts-lib unity-shared unity-shared-compiz)
target_link_libraries(unityshell unity-core-${UNITY_API_VERSION} launcher-lib dash-lib switcher-lib hud-lib panel-lib shortcuts-lib unity-shared unity-shared-bamf unity-shared-compiz)
set_target_properties(unityshell