summaryrefslogtreecommitdiff
diff options
authorJussi Pakkanen <jussi.pakkanen@canonical.com>2012-10-18 10:44:07 +0000
committerTarmac <>2012-10-18 10:44:07 +0000
commitc33ca6fbd5a2f9fa48bc1dc223af59c10724c1fd (patch)
treeee2c71b0ee57065cce3201ab3c120b6ca609f109
parentcd395b699a9a439497eea095401a764db91c2a29 (diff)
parent08498499a0a44bc2fe1a9da9c6e29df2c7063a28 (diff)
Build system cleanup work.. Approved by Marco Trevisan (TreviƱo).
(bzr r2861)
-rw-r--r--CMakeLists.txt13
-rw-r--r--UnityCore/CMakeLists.txt4
-rw-r--r--dash/CMakeLists.txt1
-rw-r--r--dash/previews/CMakeLists.txt1
-rw-r--r--hud/CMakeLists.txt1
-rw-r--r--launcher/CMakeLists.txt1
-rw-r--r--panel/CMakeLists.txt1
-rw-r--r--plugins/unityshell/CMakeLists.txt2
-rw-r--r--services/CMakeLists.txt1
-rw-r--r--shortcuts/CMakeLists.txt1
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--unity-shared/CMakeLists.txt1
-rw-r--r--unity-standalone/CMakeLists.txt1
13 files changed, 10 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7fa236f4f..623f010be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,11 +136,14 @@ if (BOOT_LOGGER)
SET (BOOT_LOGGER_FLAG "-DENABLE_LOGGER")
endif (BOOT_LOGGER)
-SET (MAINTAINER_CFLAGS "-Werror -Wall -Wcast-align -Wempty-body -Wformat-security -Winit-self -Warray-bounds")
-option (DISABLE_MAINTAINER_CFLAGS "Disable maintainer CFlags" OFF)
-if (DISABLE_MAINTAINER_CFLAGS)
- SET (MAINTAINER_CFLAGS "")
-endif (DISABLE_MAINTAINER_CFLAGS)
+SET (MAINTAINER_CXXFLAGS "-Werror -Wall -Wcast-align -Wempty-body -Wformat-security -Winit-self -Warray-bounds")
+option (DISABLE_MAINTAINER_CXXFLAGS "Disable maintainer CXXFlags" OFF)
+if (DISABLE_MAINTAINER_CXXFLAGS)
+ SET (MAINTAINER_CXXFLAGS "")
+endif (DISABLE_MAINTAINER_CXXFLAGS)
+
+# Make sure these flags are used for every build.
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MAINTAINER_CXXFLAGS}")
#
# Compiz Plugins
diff --git a/UnityCore/CMakeLists.txt b/UnityCore/CMakeLists.txt
index 38cc126b9..a036af4f0 100644
--- a/UnityCore/CMakeLists.txt
+++ b/UnityCore/CMakeLists.txt
@@ -95,14 +95,12 @@ set (CORE_SOURCES
# CFLAGS and LIBS
#
set (CFLAGS
- ${CORE_DEPS_CFLAGS}
- ${CORE_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-I${CMAKE_BINARY_DIR}"
"-DGETTEXT_PACKAGE=\"unity\""
"-DLENSES_DIR=\"${_lensesdir}\""
)
add_definitions (${CFLAGS})
+include_directories(${CORE_DEPS_INCLUDE_DIRS})
set (LIBS ${CORE_DEPS_LIBRARIES})
diff --git a/dash/CMakeLists.txt b/dash/CMakeLists.txt
index 657450885..4f61b082b 100644
--- a/dash/CMakeLists.txt
+++ b/dash/CMakeLists.txt
@@ -5,7 +5,6 @@ find_package (PkgConfig)
set (CFLAGS
${CACHED_UNITY_DEPS_CFLAGS}
${CACHED_UNITY_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-DGETTEXT_PACKAGE=\"unity\""
"-I${CMAKE_CURRENT_BINARY_DIR}"
)
diff --git a/dash/previews/CMakeLists.txt b/dash/previews/CMakeLists.txt
index bfd27173c..0f5978421 100644
--- a/dash/previews/CMakeLists.txt
+++ b/dash/previews/CMakeLists.txt
@@ -5,7 +5,6 @@ find_package (PkgConfig)
set (CFLAGS
${CACHED_UNITY_DEPS_CFLAGS}
${CACHED_UNITY_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-DGETTEXT_PACKAGE=\"unity\""
"-I${CMAKE_CURRENT_BINARY_DIR}"
)
diff --git a/hud/CMakeLists.txt b/hud/CMakeLists.txt
index 4da89417c..9ad2f34b3 100644
--- a/hud/CMakeLists.txt
+++ b/hud/CMakeLists.txt
@@ -5,7 +5,6 @@ find_package (PkgConfig)
set (CFLAGS
${CACHED_UNITY_DEPS_CFLAGS}
${CACHED_UNITY_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-DGETTEXT_PACKAGE=\"unity\""
"-I${CMAKE_CURRENT_BINARY_DIR}"
)
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index 7c701d97b..a4518bf7f 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -5,7 +5,6 @@ find_package (PkgConfig)
set (CFLAGS
${CACHED_UNITY_DEPS_CFLAGS}
${CACHED_UNITY_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-fPIC"
"-DGETTEXT_PACKAGE=\"unity\""
"-I${CMAKE_CURRENT_BINARY_DIR}"
diff --git a/panel/CMakeLists.txt b/panel/CMakeLists.txt
index 8ab407bb2..b9a67f51a 100644
--- a/panel/CMakeLists.txt
+++ b/panel/CMakeLists.txt
@@ -5,7 +5,6 @@ find_package (PkgConfig)
set (CFLAGS
${CACHED_UNITY_DEPS_CFLAGS}
${CACHED_UNITY_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-DGETTEXT_PACKAGE=\"unity\""
"-I${CMAKE_CURRENT_BINARY_DIR}"
)
diff --git a/plugins/unityshell/CMakeLists.txt b/plugins/unityshell/CMakeLists.txt
index c6ad6f75d..b60d347b5 100644
--- a/plugins/unityshell/CMakeLists.txt
+++ b/plugins/unityshell/CMakeLists.txt
@@ -7,7 +7,7 @@ set (COMPIZ_PLUGIN_INSTALL_TYPE "package")
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_CFLAGS} -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/"
+ 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"
)
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)
diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt
index 2da54dce0..26b080975 100644
--- a/services/CMakeLists.txt
+++ b/services/CMakeLists.txt
@@ -35,7 +35,6 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/panel-marshal.c
set(CFLAGS
"${SERVICE_DEPS_CFLAGS}"
${SERVICE_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-I${CMAKE_CURRENT_BINARY_DIR}"
"-DGETTEXT_PACKAGE=\"unity\""
"-DINDICATORDIR=\"${_indicatordir}\""
diff --git a/shortcuts/CMakeLists.txt b/shortcuts/CMakeLists.txt
index 80f520c90..e28b19da8 100644
--- a/shortcuts/CMakeLists.txt
+++ b/shortcuts/CMakeLists.txt
@@ -5,7 +5,6 @@ find_package (PkgConfig)
set (CFLAGS
${CACHED_UNITY_DEPS_CFLAGS}
${CACHED_UNITY_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-DGETTEXT_PACKAGE=\"unity\""
"-I${CMAKE_CURRENT_BINARY_DIR}"
)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 88a08b089..1de3d47dc 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -25,7 +25,6 @@ set (TESTDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/data")
set (CFLAGS
${TEST_UNIT_DEPS_CFLAGS}
${TEST_UNIT_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-g"
"-DTESTDATADIR=\"${TESTDATADIR}\""
"-DGETTEXT_PACKAGE=\"unity\""
diff --git a/unity-shared/CMakeLists.txt b/unity-shared/CMakeLists.txt
index d83805f86..28dcc84e8 100644
--- a/unity-shared/CMakeLists.txt
+++ b/unity-shared/CMakeLists.txt
@@ -5,7 +5,6 @@ find_package (PkgConfig)
set (CFLAGS
${CACHED_UNITY_DEPS_CFLAGS}
${CACHED_UNITY_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-DGETTEXT_PACKAGE=\"unity\""
"-I${CMAKE_CURRENT_BINARY_DIR}"
)
diff --git a/unity-standalone/CMakeLists.txt b/unity-standalone/CMakeLists.txt
index d61c8110f..f93784b10 100644
--- a/unity-standalone/CMakeLists.txt
+++ b/unity-standalone/CMakeLists.txt
@@ -5,7 +5,6 @@ find_package (PkgConfig)
set (CFLAGS
${CACHED_UNITY_DEPS_CFLAGS}
${CACHED_UNITY_DEPS_CFLAGS_OTHER}
- ${MAINTAINER_CFLAGS}
"-DGETTEXT_PACKAGE=\"unity\""
"-I${CMAKE_CURRENT_BINARY_DIR}"
)