compiz team mailing list archive
-
compiz team
-
Mailing list archive
-
Message #34771
[Merge] lp:~compiz-team/compiz/build-fixes-part-1 into lp:compiz/0.9.8
Sam Spilsbury has proposed merging lp:~compiz-team/compiz/build-fixes-part-1 into lp:compiz/0.9.8.
Requested reviews:
compiz packagers (compiz)
Daniel van Vugt (vanvugt)
For more details, see:
https://code.launchpad.net/~compiz-team/compiz/build-fixes-part-1/+merge/106558
Testers should really test the last item in the branch pipeline lp:~compiz-team/compiz/build-fixes-part-10-animationaddon-plugin
This branch fixes the "random build failure" due to missing dependencies. The problem was that an external plugin was linking libcompiz_core internally and would cause libcompiz_core to get rebuilt with the wrong header files. Since that plugin didn't actually need all of the functionality in libcompiz_core, the region calculation functions were separated out into a separate static library and this was linked instead.
This branch also removes the dependency on core.h in compizconfig. All it was pulling it was MAXSHORT / MINSHORT which is far better expressed as std::numeric_limits <short>::max () and std::numeric_limits <short>::min ()
Moved the ccp plugin to plugins/ so that we don't have to repeat a bunch of build rules for internal building
Also fixed some warnings -> -Werror -> errors related to asprintf usage
--
https://code.launchpad.net/~compiz-team/compiz/build-fixes-part-1/+merge/106558
Your team compiz packagers is requested to review the proposed merge of lp:~compiz-team/compiz/build-fixes-part-1 into lp:compiz/0.9.8.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-05-17 08:34:51 +0000
+++ CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -170,9 +170,7 @@
add_subdirectory (po)
add_subdirectory (metadata)
add_subdirectory (src)
-# compizconfig's CMake files confuse the compiz project quite a lot and
-# cause multiple build failures. Don't include it till it's fixed.
-#add_subdirectory (compizconfig)
+add_subdirectory (compizconfig)
add_subdirectory (xslt)
add_subdirectory (plugins)
add_subdirectory (tests)
=== modified file 'cmake/CompizPlugin.cmake'
--- cmake/CompizPlugin.cmake 2012-02-07 06:39:28 +0000
+++ cmake/CompizPlugin.cmake 2012-05-21 04:10:21 +0000
@@ -449,10 +449,15 @@
macro (compiz_plugin plugin)
string (TOUPPER ${plugin} _PLUGIN)
+ # If already defined, use the existing value...
+ if (NOT DEFINED COMPIZ_DISABLE_PLUGIN_${_PLUGIN})
+ set (COMPIZ_DISABLE_PLUGIN_${_PLUGIN} OFF)
+ endif ()
+
option (
COMPIZ_DISABLE_PLUGIN_${_PLUGIN}
"Disable building of plugin \"${plugin}\""
- OFF
+ ${COMPIZ_DISABLE_PLUGIN_${_PLUGIN}}
)
if (NOT COMPIZ_DISABLE_PLUGIN_${_PLUGIN})
=== modified file 'compizconfig/CMakeLists.txt'
--- compizconfig/CMakeLists.txt 2012-05-17 06:54:45 +0000
+++ compizconfig/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -1,7 +1,3 @@
-set (COMPIZ_CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
-set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${COMPIZ_CMAKE_MODULE_PATH})
-include (CompizDefaults)
-
set (_COMPIZCONFIG_INTERNAL ON)
set (LIBCOMPIZCONFIG_CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libcompizconfig/cmake )
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LIBCOMPIZCONFIG_CMAKE_MODULE_PATH})
@@ -9,10 +5,10 @@
set (COMPIZCONFIG_LIBRARY_DIRS ${CMAKE_CURRENT_BINARY_DIR}/libcompizconfig)
add_subdirectory (libcompizconfig)
-add_subdirectory (compizconfig-python)
-add_subdirectory (ccsm)
-add_subdirectory (gconf)
-add_subdirectory (gsettings)
+#add_subdirectory (compizconfig-python)
+#add_subdirectory (ccsm)
+#add_subdirectory (gconf)
+#add_subdirectory (gsettings)
add_custom_target (pyclean)
=== modified file 'compizconfig/libcompizconfig/CMakeLists.txt'
--- compizconfig/libcompizconfig/CMakeLists.txt 2012-05-17 06:54:45 +0000
+++ compizconfig/libcompizconfig/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -3,18 +3,15 @@
set (COMPIZ_CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${COMPIZ_CMAKE_MODULE_PATH})
include (CompizDefaults)
-
-find_package (Compiz REQUIRED)
-
-set (CMAKE_MODULE_PATH_ORIG ${CMAKE_MODULE_PATH})
-set (LIBCOMPIZCONFIG_CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
-set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LIBCOMPIZCONFIGZ_CMAKE_MODULE_PATH})
-
include (CompizCommon)
include (CompizPackage)
include (CheckLibraryExists)
include (CheckIncludeFile)
+set (CMAKE_MODULE_PATH_ORIG ${CMAKE_MODULE_PATH})
+set (LIBCOMPIZCONFIG_CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LIBCOMPIZCONFIG_CMAKE_MODULE_PATH})
+
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# libcompizconfig package version number
@@ -144,7 +141,6 @@
add_subdirectory (config)
add_subdirectory (backend)
-add_subdirectory (plugin)
add_subdirectory (src)
add_subdirectory (include)
add_subdirectory (cmake)
=== removed directory 'compizconfig/libcompizconfig/plugin'
=== removed file 'compizconfig/libcompizconfig/plugin/CMakeLists.txt'
--- compizconfig/libcompizconfig/plugin/CMakeLists.txt 2010-05-10 07:42:31 +0000
+++ compizconfig/libcompizconfig/plugin/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-find_package (Compiz REQUIRED)
-
-include (CompizCommon)
-include (CompizPackage)
-
-compiz_add_plugins_in_folder (${CMAKE_CURRENT_SOURCE_DIR})
=== removed file 'compizconfig/libcompizconfig/plugin/ccp.xml'
--- compizconfig/libcompizconfig/plugin/ccp.xml 2010-04-22 04:12:52 +0000
+++ compizconfig/libcompizconfig/plugin/ccp.xml 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<compiz>
- <plugin name="ccp">
- <_short>CCP</_short>
- <_long>Compizconfig Settings Plugins</_long>
- </plugin>
-</compiz>
=== modified file 'compizconfig/libcompizconfig/src/CMakeLists.txt'
--- compizconfig/libcompizconfig/src/CMakeLists.txt 2012-05-16 19:35:03 +0000
+++ compizconfig/libcompizconfig/src/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -1,5 +1,4 @@
include_directories (
- ${CMAKE_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${LIBCOMPIZCONFIG_INCLUDE_DIRS}
=== modified file 'compizconfig/libcompizconfig/src/compiz.cpp'
--- compizconfig/libcompizconfig/src/compiz.cpp 2012-01-23 11:37:14 +0000
+++ compizconfig/libcompizconfig/src/compiz.cpp 2012-05-21 04:10:21 +0000
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <limits>
+
#ifdef USE_PROTOBUF
#include "compizconfig.pb.h"
#include <google/protobuf/io/zero_copy_stream_impl.h>
@@ -47,7 +49,7 @@
#include <string>
-#include <core/core.h>
+
namespace {
@@ -407,8 +409,8 @@
initIntInfoPB (CCSSettingInfo * i, const OptionMetadata & option)
{
int num, j;
- i->forInt.min = MINSHORT;
- i->forInt.max = MAXSHORT;
+ i->forInt.min = std::numeric_limits <short>::min ();
+ i->forInt.max = std::numeric_limits <short>::max ();
i->forInt.desc = NULL;
if (option.has_int_min ())
@@ -448,8 +450,8 @@
static void
initFloatInfoPB (CCSSettingInfo * i, const OptionMetadata & option)
{
- i->forFloat.min = MINSHORT;
- i->forFloat.max = MAXSHORT;
+ i->forFloat.min = std::numeric_limits <short>::min ();
+ i->forFloat.max = std::numeric_limits <short>::max ();
i->forFloat.precision = 0.1f;
if (option.has_float_min ())
@@ -879,7 +881,8 @@
if (xmlFile)
{
pPrivate->xmlFile = strdup (xmlFile);
- asprintf (&pPrivate->xmlPath, "/compiz/plugin[@name = '%s']", name);
+ if (asprintf (&pPrivate->xmlPath, "/compiz/plugin[@name = '%s']", name) == -1)
+ pPrivate->xmlPath = NULL;
}
plugin->context = context;
@@ -1585,8 +1588,8 @@
char *name;
char *value;
int num, j;
- i->forInt.min = MINSHORT;
- i->forInt.max = MAXSHORT;
+ i->forInt.min = std::numeric_limits <short>::min ();
+ i->forInt.max = std::numeric_limits <short>::max ();
i->forInt.desc = NULL;
value = getStringFromXPath (node->doc, node, "min/child::text()");
@@ -1672,8 +1675,8 @@
char *value;
SetNumericLocale numeric_locale;
- i->forFloat.min = MINSHORT;
- i->forFloat.max = MAXSHORT;
+ i->forFloat.min = std::numeric_limits <short>::min ();
+ i->forFloat.max = std::numeric_limits <short>::max ();
i->forFloat.precision = 0.1f;
value = getStringFromXPath (node->doc, node, "min/child::text()");
@@ -1924,14 +1927,16 @@
if (cacheHome && strlen (cacheHome))
{
- asprintf (&cacheBaseDir, "%s", cacheHome);
+ if (asprintf (&cacheBaseDir, "%s", cacheHome) == -1)
+ cacheBaseDir = NULL;
}
else
{
char *home = getenv ("HOME");
if (home && strlen (home))
{
- asprintf (&cacheBaseDir, "%s/.cache", home);
+ if (asprintf (&cacheBaseDir, "%s/.cache", home) == -1)
+ cacheBaseDir = NULL;
}
}
@@ -2514,7 +2519,9 @@
if (file)
pPrivate->xmlFile = strdup (file);
- asprintf (&pPrivate->xmlPath, "/compiz/plugin[@name = '%s']", name);
+ if (asprintf (&pPrivate->xmlPath, "/compiz/plugin[@name = '%s']", name) == -1)
+ pPrivate->xmlPath = NULL;
+
plugin->context = context;
plugin->name = strdup (name);
@@ -2753,7 +2760,9 @@
char *xmlFilePath = NULL;
void *pluginInfoPBv = NULL;
- asprintf (&xmlFilePath, "%s/%s", xmlDirPath, xmlName);
+ if (asprintf (&xmlFilePath, "%s/%s", xmlDirPath, xmlName) == -1)
+ xmlFilePath = NULL;
+
if (!xmlFilePath)
{
fprintf (stderr, "[ERROR]: Can't allocate memory\n");
@@ -2789,7 +2798,9 @@
if (createProtoBufCacheDir () &&
metadataCacheDir.length () > 0)
{
- asprintf (&pbFilePath, "%s/%s.pb", metadataCacheDir.c_str (), name);
+ if (asprintf (&pbFilePath, "%s/%s.pb", metadataCacheDir.c_str (), name) == -1)
+ pbFilePath = NULL;
+
if (!pbFilePath)
{
fprintf (stderr, "[ERROR]: Can't allocate memory\n");
@@ -2989,14 +3000,17 @@
char *xmlDirPath = NULL;
char *xmlName = NULL;
- asprintf (&xmlName, "%s.xml", name);
+ if (asprintf (&xmlName, "%s.xml", name) == -1)
+ xmlName = NULL;
if (xmlName)
{
char *home = getenv ("HOME");
if (home && strlen (home))
{
- asprintf (&xmlDirPath, "%s/.compiz-1/metadata", home);
+ if (asprintf (&xmlDirPath, "%s/.compiz-1/metadata", home) == -1)
+ xmlDirPath = NULL;
+
if (xmlDirPath)
{
loadPluginFromXMLFile (context, xmlName, xmlDirPath);
@@ -3024,7 +3038,9 @@
if (home && strlen (home))
{
char *homeplugins = NULL;
- asprintf (&homeplugins, "%s/.compiz-1/metadata", home);
+ if (asprintf (&homeplugins, "%s/.compiz-1/metadata", home) == -1)
+ homeplugins = NULL;
+
if (homeplugins)
{
loadPluginsFromXMLFiles (context, homeplugins);
@@ -3036,7 +3052,9 @@
if (home && strlen (home))
{
char *homeplugins = NULL;
- asprintf (&homeplugins, "%s/.compiz-1/plugins", home);
+ if (asprintf (&homeplugins, "%s/.compiz-1/plugins", home) == -1)
+ homeplugins = NULL;
+
if (homeplugins)
{
loadPluginsFromName (context, homeplugins);
=== modified file 'compizconfig/libcompizconfig/src/config.c'
--- compizconfig/libcompizconfig/src/config.c 2010-05-22 03:57:23 +0000
+++ compizconfig/libcompizconfig/src/config.c 2012-05-21 04:10:21 +0000
@@ -38,14 +38,18 @@
configDir = getenv ("XDG_CONFIG_HOME");
if (configDir && strlen (configDir))
{
- asprintf (&fileName, "%s/%s/config", configDir, SETTINGPATH);
+ if (asprintf (&fileName, "%s/%s/config", configDir, SETTINGPATH) == -1)
+ fileName = NULL;
+
return fileName;
}
configDir = getenv ("HOME");
if (configDir && strlen (configDir))
{
- asprintf (&fileName, "%s/.config/%s/config", configDir, SETTINGPATH);
+ if (asprintf (&fileName, "%s/.config/%s/config", configDir, SETTINGPATH))
+ fileName = NULL;
+
return fileName;
}
@@ -61,7 +65,9 @@
profile = getenv ("COMPIZ_CONFIG_PROFILE");
if (profile && strlen (profile))
{
- asprintf (§ion, "general_%s", profile);
+ if (asprintf (§ion, "general_%s", profile) == -1)
+ section = NULL;
+
return section;
}
=== modified file 'compizconfig/libcompizconfig/src/ini.c'
--- compizconfig/libcompizconfig/src/ini.c 2011-08-20 19:03:37 +0000
+++ compizconfig/libcompizconfig/src/ini.c 2012-05-21 04:10:21 +0000
@@ -110,7 +110,8 @@
char *sectionName;
char *retValue;
- asprintf (§ionName, "%s:%s", section, entry);
+ if (asprintf (§ionName, "%s:%s", section, entry) == -1)
+ return NULL;
retValue = iniparser_getstring (dictionary, sectionName, NULL);
free (sectionName);
@@ -126,7 +127,8 @@
{
char *sectionName;
- asprintf (§ionName, "%s:%s", section, entry);
+ if (asprintf (§ionName, "%s:%s", section, entry) == -1)
+ return;
if (!iniparser_find_entry (dictionary, (char*) section))
iniparser_add_entry (dictionary, (char*) section, NULL, NULL);
@@ -605,7 +607,9 @@
{
char *string = NULL;
- asprintf (&string, "%i", value);
+ if (asprintf (&string, "%i", value) == -1)
+ string = NULL;
+
if (string)
{
setIniString (dictionary, section, entry, string);
@@ -621,7 +625,9 @@
{
char *string = NULL;
- asprintf (&string, "%f", value);
+ if (asprintf (&string, "%f", value))
+ string = NULL;
+
if (string)
{
setIniString (dictionary, section, entry, string);
@@ -815,7 +821,9 @@
{
char *sectionName;
- asprintf (§ionName, "%s:%s", section, entry);
+ if (asprintf (§ionName, "%s:%s", section, entry) == -1)
+ return;
+
iniparser_unset (dictionary, sectionName);
free (sectionName);
}
=== modified file 'compizconfig/libcompizconfig/src/main.c'
--- compizconfig/libcompizconfig/src/main.c 2011-11-10 00:58:18 +0000
+++ compizconfig/libcompizconfig/src/main.c 2012-05-21 04:10:21 +0000
@@ -602,8 +602,10 @@
if (home && strlen (home))
{
- asprintf (&dlname, "%s/.compizconfig/backends/lib%s.so",
- home, backend);
+ if (asprintf (&dlname, "%s/.compizconfig/backends/lib%s.so",
+ home, backend) == -1)
+ dlname = NULL;
+
dlerror ();
dlhand = dlopen (dlname, RTLD_NOW | RTLD_NODELETE | RTLD_LOCAL);
err = dlerror ();
@@ -614,8 +616,9 @@
if (dlname) {
free (dlname);
}
- asprintf (&dlname, "%s/compizconfig/backends/lib%s.so",
- LIBDIR, backend);
+ if (asprintf (&dlname, "%s/compizconfig/backends/lib%s.so",
+ LIBDIR, backend) == -1)
+ dlname = NULL;
dlhand = dlopen (dlname, RTLD_NOW | RTLD_NODELETE | RTLD_LOCAL);
err = dlerror ();
}
@@ -2696,15 +2699,24 @@
if (home && strlen (home))
{
- asprintf (&backenddir, "%s/.compizconfig/backends", home);
+ if (asprintf (&backenddir, "%s/.compizconfig/backends", home))
+ backenddir = NULL;
+
+ if (backenddir)
+ {
+ getBackendInfoFromDir (&rv, backenddir);
+ free (backenddir);
+ }
+ }
+
+ if (asprintf (&backenddir, "%s/compizconfig/backends", LIBDIR))
+ backenddir = NULL;
+
+ if (backenddir)
+ {
getBackendInfoFromDir (&rv, backenddir);
free (backenddir);
}
-
- asprintf (&backenddir, "%s/compizconfig/backends", LIBDIR);
-
- getBackendInfoFromDir (&rv, backenddir);
- free (backenddir);
return rv;
}
@@ -2739,8 +2751,9 @@
if (skipDefaults && setting->isDefault)
continue;
- asprintf (&keyName, "s%d_%s",
- context->screenNum, setting->name);
+ if (asprintf (&keyName, "s%d_%s",
+ context->screenNum, setting->name) == -1)
+ return FALSE;
switch (setting->type)
{
@@ -2819,7 +2832,9 @@
char *sectionName = strdup (setting->parent->name);
char *iniValue = NULL;
- asprintf (&keyName, "+s%d_%s", context->screenNum, setting->name);
+ if (asprintf (&keyName, "+s%d_%s", context->screenNum, setting->name) == -1)
+ return FALSE;
+
if (ccsIniGetString (dict, sectionName, keyName, &iniValue))
{
CCSSetting *newSetting = malloc (sizeof (CCSSetting));
@@ -2971,7 +2986,9 @@
char *sectionName = strdup (setting->parent->name);
char *iniValue = NULL;
- asprintf (&keyName, "-s%d_%s", context->screenNum, setting->name);
+ if (asprintf (&keyName, "-s%d_%s", context->screenNum, setting->name) == -1)
+ return FALSE;
+
if (ccsIniGetString (dict, sectionName, keyName, &iniValue))
{
CCSSetting *newSetting = malloc (sizeof (CCSSetting));
@@ -3438,7 +3455,8 @@
if (!home)
return FALSE;
- asprintf (&dupath, "%s/.config/compiz-1/compizconfig/done_upgrades", home);
+ if (asprintf (&dupath, "%s/.config/compiz-1/compizconfig/done_upgrades", home) == -1)
+ return FALSE;
completedUpgrades = fopen (dupath, "a+");
@@ -3539,8 +3557,9 @@
if (!setting->isDefault && !overwriteNonDefault)
continue;
- asprintf (&keyName, "s%d_%s",
- context->screenNum, setting->name);
+ if (asprintf (&keyName, "s%d_%s",
+ context->screenNum, setting->name) == -1)
+ return FALSE;
switch (setting->type)
{
=== modified file 'include/core/CMakeLists.txt'
--- include/core/CMakeLists.txt 2012-01-30 05:12:24 +0000
+++ include/core/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -12,7 +12,6 @@
plugin.h
propertywriter.h
privateunion.h
- region.h
screen.h
serialization.h
session.h
=== modified file 'plugins/CMakeLists.txt'
--- plugins/CMakeLists.txt 2012-01-20 09:46:31 +0000
+++ plugins/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -16,6 +16,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/../src/pluginclasshandler/include
${CMAKE_CURRENT_SOURCE_DIR}/../src/point/include
${CMAKE_CURRENT_SOURCE_DIR}/../src/rect/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/../src/region/include
${CMAKE_CURRENT_SOURCE_DIR}/../src/window/geometry/include
${CMAKE_CURRENT_SOURCE_DIR}/../src/window/geometry-saver/include
${CMAKE_CURRENT_SOURCE_DIR}/../src/window/extents/include
=== renamed directory 'compizconfig/libcompizconfig/plugin/ccp' => 'plugins/ccp'
=== modified file 'plugins/ccp/CMakeLists.txt'
--- compizconfig/libcompizconfig/plugin/ccp/CMakeLists.txt 2010-05-17 18:21:50 +0000
+++ plugins/ccp/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -1,12 +1,6 @@
find_package (Compiz REQUIRED)
-include (CompizPlugin)
-include (CompizCommon)
-
-set (COMPIZ_PLUGIN_INSTALL_TYPE
- "compiz")
-
-compiz_plugin (ccp LIBRARIES compizconfig)
+compiz_plugin (ccp LIBRARIES compizconfig CFLAGSADD -I${CMAKE_SOURCE_DIR}/compizconfig/libcompizconfig/include)
if (COMPIZ_BUILD_WITH_RPATH)
set_target_properties (
=== modified file 'plugins/ccp/src/ccp.h'
--- compizconfig/libcompizconfig/plugin/ccp/src/ccp.h 2010-05-10 07:42:31 +0000
+++ plugins/ccp/src/ccp.h 2012-05-21 04:10:21 +0000
@@ -18,10 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
-
extern "C" {
#include <string.h>
#include <stdio.h>
=== modified file 'plugins/grid/tests/grabhandler/CMakeLists.txt'
--- plugins/grid/tests/grabhandler/CMakeLists.txt 2012-01-24 11:25:54 +0000
+++ plugins/grid/tests/grabhandler/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -1,4 +1,4 @@
-include_directories (${compiz_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src)
+include_directories (${compiz_INCLUDE_DIRS} ${CMAKE_CURENT_SOURCE_DIR}/../../src)
add_executable (test-grid-grab-handler
test-grid-grab-handler.cpp
=== modified file 'plugins/wall/CMakeLists.txt'
--- plugins/wall/CMakeLists.txt 2012-05-16 17:41:07 +0000
+++ plugins/wall/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -1,6 +1,7 @@
find_package (Compiz REQUIRED)
include (CompizPlugin)
+include (CompizDefaults)
add_subdirectory (src/offset_movement)
include_directories (src/offset_movement/include)
=== modified file 'plugins/wall/src/offset_movement/CMakeLists.txt'
--- plugins/wall/src/offset_movement/CMakeLists.txt 2012-05-09 01:50:55 +0000
+++ plugins/wall/src/offset_movement/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -1,25 +1,13 @@
-pkg_check_modules (
- GLIBMM
- REQUIRED
- glibmm-2.4 glib-2.0 compiz
-)
-
INCLUDE_DIRECTORIES (
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/src
-
- ${CMAKE_SOURCE_DIR}/include
${Boost_INCLUDE_DIRS}
${GLIBMM_INCLUDE_DIRS}
)
-LINK_DIRECTORIES (${GLIBMM_LIBRARY_DIRS})
-
-SET (
- PUBLIC_HEADERS
-)
+LINK_DIRECTORIES (${GLIBMM_LIBRARY_DIRS} ${COMPIZ_LIBRARY_DIRS})
SET (
PRIVATE_HEADERS
@@ -36,7 +24,6 @@
${SRCS}
- ${PUBLIC_HEADERS}
${PRIVATE_HEADERS}
)
@@ -44,14 +31,9 @@
ADD_SUBDIRECTORY( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
endif (COMPIZ_BUILD_TESTING)
-SET_TARGET_PROPERTIES(
- compiz_wall_offset_movement PROPERTIES
- PUBLIC_HEADER "${PUBLIC_HEADERS}"
-)
-
TARGET_LINK_LIBRARIES(
compiz_wall_offset_movement
- compiz_core
- ${GLIBMM_LIBRARIES}
+ compiz_rect
+ compiz_region
)
=== modified file 'plugins/wall/src/offset_movement/tests/CMakeLists.txt'
--- plugins/wall/src/offset_movement/tests/CMakeLists.txt 2012-05-17 06:54:45 +0000
+++ plugins/wall/src/offset_movement/tests/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -1,9 +1,3 @@
-pkg_check_modules (
- COMPIZ
- REQUIRED
- glibmm-2.4 glib-2.0
-)
-
find_library (GMOCK_LIBRARY gmock)
find_library (GMOCK_MAIN_LIBRARY gmock_main)
@@ -13,8 +7,6 @@
endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
include_directories (${GTEST_INCLUDE_DIRS})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories (${COMPIZ_INCLUDE_DIRS})
link_directories (${COMPIZ_LIBRARY_DIRS})
@@ -26,8 +18,7 @@
${GTEST_BOTH_LIBRARIES}
${GMOCK_LIBRARY}
${GMOCK_MAIN_LIBRARY}
- ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
- compiz_core
+ ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
)
gtest_add_tests (compiz_test_wall_offset_movement "" ${CMAKE_CURRENT_SOURCE_DIR}/test-wall-offset-movement.cpp)
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2012-03-13 10:17:02 +0000
+++ src/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -7,12 +7,12 @@
add_subdirectory( pluginclasshandler )
add_subdirectory( point )
add_subdirectory( rect )
+add_subdirectory( region )
add_subdirectory( window )
IF (COMPIZ_BUILD_TESTING)
add_subdirectory( privatescreen/tests )
add_subdirectory( wrapsystem/tests )
-add_subdirectory( region/tests )
add_subdirectory( plugin )
add_subdirectory( option/tests )
ENDIF (COMPIZ_BUILD_TESTING)
@@ -57,6 +57,9 @@
${CMAKE_CURRENT_SOURCE_DIR}/rect/include
${CMAKE_CURRENT_SOURCE_DIR}/rect/src
+ ${CMAKE_CURRENT_SOURCE_DIR}/region/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/region/src
+
${CMAKE_CURRENT_SOURCE_DIR}/window/geometry/include
${CMAKE_CURRENT_SOURCE_DIR}/window/geometry/src
@@ -89,7 +92,6 @@
add_library (compiz_core SHARED
${CMAKE_CURRENT_SOURCE_DIR}/global.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/region.cpp
${CMAKE_CURRENT_SOURCE_DIR}/atoms.cpp
${CMAKE_CURRENT_SOURCE_DIR}/actions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/screen.cpp
@@ -155,6 +157,7 @@
compiz_pluginclasshandler
compiz_point
compiz_rect
+ compiz_region
compiz_window_geometry
compiz_window_geometry_saver
compiz_window_extents
=== modified file 'src/option/tests/CMakeLists.txt'
--- src/option/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000
+++ src/option/tests/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -6,6 +6,7 @@
${compiz_SOURCE_DIR}/src/logmessage/include
${compiz_SOURCE_DIR}/src/string/include
${compiz_SOURCE_DIR}/src/rect/include
+ ${compiz_SOURCE_DIR}/src/region/include
${compiz_SOURCE_DIR}/src/point/include
${compiz_SOURCE_DIR}/src/window/geometry/include
${compiz_SOURCE_DIR}/src/window/extents/include
=== modified file 'src/plugin/CMakeLists.txt'
--- src/plugin/CMakeLists.txt 2012-03-13 10:17:02 +0000
+++ src/plugin/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -9,6 +9,7 @@
${compiz_SOURCE_DIR}/src/timer/src
${compiz_SOURCE_DIR}/src/rect/include
+ ${compiz_SOURCE_DIR}/src/region/include
${compiz_SOURCE_DIR}/src/window/geometry/include
${compiz_SOURCE_DIR}/src/window/extents/include
=== modified file 'src/privatescreen/tests/CMakeLists.txt'
--- src/privatescreen/tests/CMakeLists.txt 2012-03-06 17:44:14 +0000
+++ src/privatescreen/tests/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -12,6 +12,7 @@
${compiz_SOURCE_DIR}/src/timer/src
${compiz_SOURCE_DIR}/src/rect/include
+ ${compiz_SOURCE_DIR}/src/region/include
${compiz_SOURCE_DIR}/src/screen/geometry/include
${compiz_SOURCE_DIR}/src/window/geometry/include
${compiz_SOURCE_DIR}/src/window/extents/include
=== added file 'src/region/CMakeLists.txt'
--- src/region/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/region/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -0,0 +1,64 @@
+pkg_check_modules (
+ X11
+ REQUIRED
+ x11
+)
+
+INCLUDE_DIRECTORIES (
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
+
+ ${compiz_SOURCE_DIR}/src/point/include
+ ${compiz_SOURCE_DIR}/include
+
+ ${compiz_SOURCE_DIR}/src/rect/include
+ ${compiz_SOURCE_DIR}/include
+
+ ${Boost_INCLUDE_DIRS}
+
+ ${GLIBMM_INCLUDE_DIRS}
+)
+
+LINK_DIRECTORIES (${X11_LIBRARY_DIRS})
+
+SET (
+ PUBLIC_HEADERS
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/core/region.h
+)
+
+SET (
+ PRIVATE_HEADERS
+)
+
+SET(
+ SRCS
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/region.cpp
+)
+
+ADD_LIBRARY(
+ compiz_region STATIC
+
+ ${SRCS}
+
+ ${PUBLIC_HEADERS}
+ ${PRIVATE_HEADERS}
+)
+
+IF (COMPIZ_BUILD_TESTING)
+ADD_SUBDIRECTORY( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
+ENDIF (COMPIZ_BUILD_TESTING)
+
+SET_TARGET_PROPERTIES(
+ compiz_region PROPERTIES
+ PUBLIC_HEADER "${PUBLIC_HEADERS}"
+)
+
+install (FILES ${PUBLIC_HEADERS} DESTINATION ${COMPIZ_CORE_INCLUDE_DIR})
+
+TARGET_LINK_LIBRARIES(
+ compiz_region
+ compiz_point
+ compiz_rect
+
+ ${X11_LIBRARIES}
+)
=== added directory 'src/region/include'
=== added directory 'src/region/include/core'
=== renamed file 'include/core/region.h' => 'src/region/include/core/region.h'
=== added directory 'src/region/src'
=== renamed file 'src/region.cpp' => 'src/region/src/region.cpp'
=== modified file 'src/region/tests/CMakeLists.txt'
--- src/region/tests/CMakeLists.txt 2012-02-15 17:45:25 +0000
+++ src/region/tests/CMakeLists.txt 2012-05-21 04:10:21 +0000
@@ -2,6 +2,7 @@
${CMAKE_CURRENT_SOURCE_DIR}
${compiz_SOURCE_DIR}/src/rect/include
+ ${compiz_SOURCE_DIR}/src/region/include
${compiz_SOURCE_DIR}/include
${compiz_SOURCE_DIR}/src
)
@@ -23,9 +24,9 @@
target_link_libraries(
compiz_region_test
- compiz_core
- compiz_window_constrainment
- compiz_logmessage
+ compiz_region
+ compiz_rect
+ compiz_point
${GTEST_BOTH_LIBRARIES}
${GMOCK_LIBRARY}
Follow ups