diff options
author | Sam Spilsbury <SmSpillaz@gmail.com> | 2010-05-15 12:54:32 +0800 |
---|---|---|
committer | Sam Spilsbury <SmSpillaz@gmail.com> | 2010-05-15 12:54:32 +0800 |
commit | 9ba6b2fc793b88e3d7775fe36a5915a96641b5da (patch) | |
tree | ca2e9d5d26b78c3477ed512d80a8f557196198b4 | |
parent | c3d7dd9fb629fd85530b24fa7b14c7e5824f97ad (diff) | |
download | compiz-with-glib-mainloop-9ba6b2fc793b88e3d7775fe36a5915a96641b5da.tar.gz compiz-with-glib-mainloop-9ba6b2fc793b88e3d7775fe36a5915a96641b5da.tar.bz2 |
Add necessary changes to compile without rpath usage
-rw-r--r-- | cmake/CompizCommon.cmake | 2 | ||||
-rw-r--r-- | cmake/CompizPlugin.cmake | 2 | ||||
-rw-r--r-- | plugins/compiztoolbox/CMakeLists.txt | 2 | ||||
-rw-r--r-- | plugins/compiztoolbox/compiztoolbox.xml.in | 7 | ||||
-rw-r--r-- | plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h | 2 | ||||
-rw-r--r-- | plugins/compiztoolbox/src/compiztoolbox.cpp | 43 | ||||
-rw-r--r-- | plugins/screenshot/screenshot.xml.in | 2 | ||||
-rw-r--r-- | plugins/screenshot/src/screenshot.cpp | 7 | ||||
-rw-r--r-- | plugins/switcher/src/switcher.cpp | 7 | ||||
-rw-r--r-- | plugins/switcher/switcher.xml.in | 2 |
10 files changed, 66 insertions, 10 deletions
diff --git a/cmake/CompizCommon.cmake b/cmake/CompizCommon.cmake index 8d461a7..2f75d97 100644 --- a/cmake/CompizCommon.cmake +++ b/cmake/CompizCommon.cmake @@ -13,7 +13,7 @@ cmake_policy (SET CMP0003 NEW) cmake_policy (SET CMP0005 OLD) cmake_policy (SET CMP0011 OLD) -set (CMAKE_SKIP_RPATH FALSE) +set (CMAKE_SKIP_RPATH TRUE) set (COMPIZ_DATADIR ${CMAKE_INSTALL_PREFIX}/share) set (COMPIZ_METADATADIR ${CMAKE_INSTALL_PREFIX}/share/compiz) diff --git a/cmake/CompizPlugin.cmake b/cmake/CompizPlugin.cmake index d020bed..a6a239e 100644 --- a/cmake/CompizPlugin.cmake +++ b/cmake/CompizPlugin.cmake @@ -384,8 +384,6 @@ function (_build_compiz_plugin plugin) set_target_properties ( ${plugin} PROPERTIES INSTALL_RPATH_USE_LINK_PATH 1 - BUILD_WITH_INSTALL_RPATH 1 - SKIP_BUILD_RPATH 0 COMPILE_FLAGS "${${_PLUGIN}_CFLAGSADD}" LINK_FLAGS "${${_PLUGIN}_LDFLAGSADD}" ) diff --git a/plugins/compiztoolbox/CMakeLists.txt b/plugins/compiztoolbox/CMakeLists.txt index d6a1f89..776f518 100644 --- a/plugins/compiztoolbox/CMakeLists.txt +++ b/plugins/compiztoolbox/CMakeLists.txt @@ -2,4 +2,4 @@ find_package (Compiz REQUIRED) include (CompizPlugin) -compiz_plugin(compiztoolbox PLUGINDEPS composite opengl) +compiz_plugin (compiztoolbox PLUGINDEPS composite opengl) diff --git a/plugins/compiztoolbox/compiztoolbox.xml.in b/plugins/compiztoolbox/compiztoolbox.xml.in new file mode 100644 index 0000000..2152ee6 --- /dev/null +++ b/plugins/compiztoolbox/compiztoolbox.xml.in @@ -0,0 +1,7 @@ +<compiz> + <plugin name="compiztoolbox" useBcop="true"> + <_short>Compiz Library Toolbox</_short> + <_long>Commonly used routines by plugins separated into a separate library</_long> + <category>Utility</category> + </plugin> +</compiz> diff --git a/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h b/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h index 3223348..953bbd1 100644 --- a/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h +++ b/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h @@ -39,6 +39,8 @@ #include <fstream> +#define COMPIZ_COMPIZTOOLBOX_ABI 1 + typedef enum { XDGUserDirDesktop = 0, diff --git a/plugins/compiztoolbox/src/compiztoolbox.cpp b/plugins/compiztoolbox/src/compiztoolbox.cpp index 2a4dabf..f251df4 100644 --- a/plugins/compiztoolbox/src/compiztoolbox.cpp +++ b/plugins/compiztoolbox/src/compiztoolbox.cpp @@ -26,6 +26,24 @@ #include <core/core.h> #include <compiztoolbox/compiztoolbox.h> +#include "compiztoolbox_options.h" + +class CompizToolboxScreen : + public PluginClassHandler <CompizToolboxScreen, CompScreen>, + public CompiztoolboxOptions +{ + public: + CompizToolboxScreen (CompScreen *); +}; + +class CompizToolboxPluginVTable : + public CompPlugin::VTableForScreen <CompizToolboxScreen> +{ + bool init (); + void fini (); +}; + +COMPIZ_PLUGIN_20090315 (compiztoolbox, CompizToolboxPluginVTable); CompString getXDGUserDir (XDGUserDir userDir) @@ -660,3 +678,28 @@ BaseSwitchWindow::BaseSwitchWindow (BaseSwitchScreen *ss, CompWindow *w) : { } +CompizToolboxScreen::CompizToolboxScreen (CompScreen *screen) : + PluginClassHandler <CompizToolboxScreen, CompScreen> (screen) +{ +} + +bool +CompizToolboxPluginVTable::init () +{ + if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) || + !CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) || + !CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI)) + return false; + + CompPrivate p; + p.uval = COMPIZ_COMPOSITE_ABI; + screen->storeValue ("compiztoolbox_ABI", p); + + return true; +} + +void +CompizToolboxPluginVTable::fini () +{ + screen->eraseValue ("compiztoolbox_ABI"); +} diff --git a/plugins/screenshot/screenshot.xml.in b/plugins/screenshot/screenshot.xml.in index 122a0ff..12e26c0 100644 --- a/plugins/screenshot/screenshot.xml.in +++ b/plugins/screenshot/screenshot.xml.in @@ -5,7 +5,9 @@ <category>Extras</category> <deps> <requirement> + <plugin>composite</plugin> <plugin>opengl</plugin> + <plugin>compiztoolbox</plugin> <feature>imageext:png</feature> </requirement> </deps> diff --git a/plugins/screenshot/src/screenshot.cpp b/plugins/screenshot/src/screenshot.cpp index b058d41..b2f2dfb 100644 --- a/plugins/screenshot/src/screenshot.cpp +++ b/plugins/screenshot/src/screenshot.cpp @@ -351,9 +351,10 @@ ShotScreen::ShotScreen (CompScreen *screen) : bool ShotPluginVTable::init () { - if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) | - !CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) | - !CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI)) + if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) || + !CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) || + !CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI) || + !CompPlugin::checkPluginABI ("compiztoolbox", COMPIZ_COMPIZTOOLBOX_ABI)) return false; return true; diff --git a/plugins/switcher/src/switcher.cpp b/plugins/switcher/src/switcher.cpp index d7a8f8c..6467fe1 100644 --- a/plugins/switcher/src/switcher.cpp +++ b/plugins/switcher/src/switcher.cpp @@ -1175,9 +1175,10 @@ SwitchWindow::SwitchWindow (CompWindow *window) : bool SwitchPluginVTable::init () { - if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) | - !CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) | - !CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI)) + if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) || + !CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) || + !CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI) || + !CompPlugin::checkPluginABI ("compiztoolbox", COMPIZ_COMPIZTOOLBOX_ABI)) return false; return true; diff --git a/plugins/switcher/switcher.xml.in b/plugins/switcher/switcher.xml.in index c29d2da..028a730 100644 --- a/plugins/switcher/switcher.xml.in +++ b/plugins/switcher/switcher.xml.in @@ -5,7 +5,9 @@ <category>Window Management</category> <deps> <requirement> + <plugin>composite</plugin> <plugin>opengl</plugin> + <plugin>compiztoolbox</plugin> </requirement> </deps> <options> |