summaryrefslogtreecommitdiff
diff options
-rw-r--r--CMakeLists.txt30
-rw-r--r--UnityCore/CMakeLists.txt16
-rw-r--r--UnityCore/DBusIndicators.cpp2
-rw-r--r--config.h.cmake5
-rw-r--r--data/pam/CMakeLists.txt2
-rw-r--r--debian/libunity-core-6.0-9.install2
-rwxr-xr-xdebian/rules9
-rw-r--r--debian/unity-services.install2
-rw-r--r--debian/unity.install2
-rw-r--r--gnome/CMakeLists.txt2
-rw-r--r--plugins/networkarearegion/CMakeLists.txt5
-rw-r--r--plugins/unity-mt-grab-handles/CMakeLists.txt5
-rw-r--r--plugins/unityshell/CMakeLists.txt7
-rw-r--r--services/CMakeLists.txt6
-rw-r--r--services/unity-panel-service-lockscreen.conf.in2
-rw-r--r--services/unity-panel-service.conf.in2
-rw-r--r--tools/CMakeLists.txt5
-rwxr-xr-xunity-shared/DashStyle.cpp2
18 files changed, 64 insertions, 42 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8da80363..d9b6a0e71 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8.9)
include (cmake/Documentation.cmake)
include (cmake/pch.cmake)
+include (GNUInstallDirs)
#
# Base bits
@@ -38,6 +39,12 @@ option(
ON
)
+option(
+ ENABLE_NETWORKAREAREGION_PLUGIN
+ "Enable Unity Network Area region Plugin"
+ OFF
+)
+
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
set (PIC_FLAGS "-fPIC")
endif()
@@ -149,15 +156,16 @@ add_dependencies (release distcheck)
#
# config.h
#
-set (PREFIXDIR "${CMAKE_INSTALL_PREFIX}")
-set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
-set (PKGDATADIR "${DATADIR}/unity/icons")
-set (SOURCEDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
-set (GETTEXT_PACKAGE "unity")
-set (LOCALE_DIR "${DATADIR}/locale")
set (VERSION "${UNITY_VERSION}")
+set (PREFIXPATH "${CMAKE_INSTALL_PREFIX}")
+set (UNITYLIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/unity")
+set (UNITYDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/unity")
+set (PKGDATADIR "${UNITYDATADIR}/icons")
+set (SOURCEDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
set (BUILDDIR "${CMAKE_BINARY_DIR}")
set (TESTDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/data")
+set (LOCALE_DIR "${CMAKE_INSTALL_FULL_LOCALEDIR}")
+set (GETTEXT_PACKAGE "unity")
find_package (PkgConfig)
execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gtk+-3.0 --variable prefix OUTPUT_VARIABLE GTK_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -274,11 +282,15 @@ if (ENABLE_X_SUPPORT)
add_subdirectory(panel)
add_subdirectory(decorations)
add_subdirectory(plugins/unityshell)
- add_subdirectory(plugins/networkarearegion)
add_subdirectory(plugins/unity-mt-grab-handles)
add_subdirectory(shortcuts)
add_subdirectory(shutdown)
add_subdirectory(unity-standalone)
+
+ if (ENABLE_NETWORKAREAREGION_PLUGIN)
+ add_subdirectory(plugins/networkarearegion)
+ endif (ENABLE_NETWORKAREAREGION_PLUGIN)
+
endif ()
add_subdirectory(doc)
@@ -355,7 +367,7 @@ SET (UNITY_TEST_SCHEMAS "external.gschema.xml")
# Have an option to not install the schema into where GLib is
option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF)
if (GSETTINGS_LOCALINSTALL)
- SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/")
+ SET (GSETTINGS_DIR "${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas/")
else (GSETTINGS_LOCALINSTALL)
execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/")
@@ -376,7 +388,7 @@ install (CODE "message (STATUS \"Compiling GSettings schemas\")")
install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})")
# Resources
-install (FILES resources/dash-widgets.json DESTINATION ${CMAKE_INSTALL_PREFIX}/share/unity/themes)
+install (FILES resources/dash-widgets.json DESTINATION ${CMAKE_INSTALL_DATADIR}/unity/themes)
file (GLOB _datafiles "${CMAKE_CURRENT_SOURCE_DIR}/resources/*")
install (FILES ${_datafiles} DESTINATION ${PKGDATADIR})
diff --git a/UnityCore/CMakeLists.txt b/UnityCore/CMakeLists.txt
index f055790d3..0693f7e67 100644
--- a/UnityCore/CMakeLists.txt
+++ b/UnityCore/CMakeLists.txt
@@ -149,22 +149,22 @@ set_target_properties(${CORE_LIB_NAME} PROPERTIES
add_pch(pch/unitycore_pch.hh ${CORE_LIB_NAME})
install (TARGETS ${CORE_LIB_NAME}
- RUNTIME DESTINATION bin
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
#
# Headers
#
-install (FILES ${CORE_HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Unity-${UNITY_API_VERSION}/UnityCore)
+install (FILES ${CORE_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Unity-${UNITY_API_VERSION}/UnityCore)
#
# PkgConfig file
#
-set (EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")
-set (LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
-set (INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include")
+set (EXEC_PREFIX "${CMAKE_INSTALL_LIBEXECDIR}")
+set (LIBDIR "${CMAKE_INSTALL_LIBDIR}")
+set (INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
configure_file (unity-core.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${CORE_LIB_NAME}.pc @ONLY)
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_LIB_NAME}.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_LIB_NAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff --git a/UnityCore/DBusIndicators.cpp b/UnityCore/DBusIndicators.cpp
index b890124c3..6021418f2 100644
--- a/UnityCore/DBusIndicators.cpp
+++ b/UnityCore/DBusIndicators.cpp
@@ -123,7 +123,7 @@ void DBusIndicators::Impl::CheckLocalService()
// This is obviously hackish, but this part of the code is mostly hackish...
// Let's attempt to run it from where we expect it to be
- std::string cmd = PREFIXDIR + std::string("/lib/unity/unity-panel-service");
+ std::string cmd = UNITYLIBDIR"/" + std::string("unity-panel-service");
LOG_WARN(logger) << "Couldn't load panel from installed services, "
<< "so trying to load panel from known location: " << cmd;
diff --git a/config.h.cmake b/config.h.cmake
index 75f2a49de..11dfa0e5f 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -1,8 +1,9 @@
#ifndef CONFIG_H
#define CONFIG_H
-#cmakedefine PREFIXDIR "@PREFIXDIR@"
-#cmakedefine DATADIR "@DATADIR@"
+#cmakedefine PREFIXPATH "@PREFIXPATH@"
+#cmakedefine UNITYDATADIR "@UNITYDATADIR@"
+#cmakedefine UNITYLIBDIR "@UNITYLIBDIR@"
#cmakedefine PKGDATADIR "@PKGDATADIR@"
#cmakedefine LOCALE_DIR "@LOCALE_DIR@"
#cmakedefine VERSION "@VERSION@"
diff --git a/data/pam/CMakeLists.txt b/data/pam/CMakeLists.txt
index ece7a4cc8..73f4b7d57 100644
--- a/data/pam/CMakeLists.txt
+++ b/data/pam/CMakeLists.txt
@@ -1 +1 @@
-install(FILES unity DESTINATION ${CMAKE_SYSCONFDIR}/pam.d) \ No newline at end of file
+install(FILES unity DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/pam.d)
diff --git a/debian/libunity-core-6.0-9.install b/debian/libunity-core-6.0-9.install
index 99c27b8a7..be488a661 100644
--- a/debian/libunity-core-6.0-9.install
+++ b/debian/libunity-core-6.0-9.install
@@ -1,5 +1,5 @@
usr/lib/*/libunity-core*.so.*
-usr/lib/unity/*.py
+usr/lib/*/unity/*.py
usr/share/ccsm
usr/share/gnome-control-center/
usr/share/unity
diff --git a/debian/rules b/debian/rules
index 559781196..5f4d89837 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,7 +23,7 @@ NUX_ABIVERSION := $(shell sed -rn 's/^\#define[[:space:]]+NUX_ABIVERSION[[:space
LIBUNITY_PRIVATE := $(shell pkg-config --libs-only-L unity-protocol-private | sed -e 's/-L\(.*\)/\1/' )
SCOPES_RECOMMENDS := $(shell perl debian/scopes-recommends-generator /usr/share/unity/client-scopes.json)
-cmake_base_options := -DUSE_GSETTINGS=TRUE -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_PACKAGING_ENABLED=TRUE -DCMAKE_SYSCONFDIR=/etc -DCOMPIZ_PLUGIN_INSTALL_TYPE=package
+cmake_base_options := -DUSE_GSETTINGS=TRUE -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_PACKAGING_ENABLED=TRUE -DCOMPIZ_PLUGIN_INSTALL_TYPE=package
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
cmake_gl_options := -DBUILD_GLES=TRUE -DDISABLE_MAINTAINER_CFLAGS=ON
endif
@@ -39,12 +39,7 @@ override_dh_install:
done; \
cd $(CURDIR)
find debian/tmp/usr/lib -name \*.*a -exec rm {} \;
- rm -f debian/tmp/usr/share/compiz/networkarearegion.xml
- rm -f debian/tmp//usr/lib/compiz/libnetworkarearegion.so
- rm -rf debian/tmp/usr/share/gconf/schemas/
- mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
- mv debian/tmp/usr/lib/lib*so* debian/tmp/usr/lib/pkgconfig \
- debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
+ rm -rf debian/tmp/usr/share/gconf/schemas
dh_install --fail-missing
override_dh_gencontrol:
diff --git a/debian/unity-services.install b/debian/unity-services.install
index b7ab4d33f..4f0e67ca8 100644
--- a/debian/unity-services.install
+++ b/debian/unity-services.install
@@ -1,3 +1,3 @@
-usr/lib/unity/*service
+usr/lib/*/unity/*service
usr/share/upstart
usr/share/man/*/unity-panel-service.1
diff --git a/debian/unity.install b/debian/unity.install
index bf5cdc899..22e55b097 100644
--- a/debian/unity.install
+++ b/debian/unity.install
@@ -1,6 +1,6 @@
etc/pam.d
usr/bin
-usr/lib/compiz
+usr/lib/*/compiz/libunity*.so
usr/share/man/*/unity.1
usr/share/compiz
usr/share/locale
diff --git a/gnome/CMakeLists.txt b/gnome/CMakeLists.txt
index c99077df4..f98b62d11 100644
--- a/gnome/CMakeLists.txt
+++ b/gnome/CMakeLists.txt
@@ -6,7 +6,7 @@ compiz_translate_xml (${CMAKE_CURRENT_SOURCE_DIR}/50-unity-launchers.xml.in
${CMAKE_CURRENT_BINARY_DIR}/50-unity-launchers.xml NOTRANSLATIONS)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/50-unity-launchers.xml
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gnome-control-center/keybindings)
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/gnome-control-center/keybindings)
add_custom_target (unity-gnome-keybindings ALL DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/50-unity-launchers.xml)
diff --git a/plugins/networkarearegion/CMakeLists.txt b/plugins/networkarearegion/CMakeLists.txt
index ea1ece005..7d7af425b 100644
--- a/plugins/networkarearegion/CMakeLists.txt
+++ b/plugins/networkarearegion/CMakeLists.txt
@@ -8,6 +8,11 @@ if(CMAKE_BUILD_TYPE STREQUAL "")
set(revert_compiz TRUE)
endif()
+set (libdir ${CMAKE_INSTALL_LIBDIR})
+set (includedir ${CMAKE_INSTALL_INCLUDEDIR})
+set (libdir ${CMAKE_INSTALL_LIBDIR})
+set (datadir ${CMAKE_INSTALL_FULL_DATADIR})
+
compiz_plugin (networkarearegion)
if(revert_compiz)
diff --git a/plugins/unity-mt-grab-handles/CMakeLists.txt b/plugins/unity-mt-grab-handles/CMakeLists.txt
index ec13c9f0d..acaaa8db3 100644
--- a/plugins/unity-mt-grab-handles/CMakeLists.txt
+++ b/plugins/unity-mt-grab-handles/CMakeLists.txt
@@ -8,6 +8,11 @@ if(CMAKE_BUILD_TYPE STREQUAL "")
set(revert_compiz TRUE)
endif()
+set (libdir ${CMAKE_INSTALL_LIBDIR})
+set (includedir ${CMAKE_INSTALL_INCLUDEDIR})
+set (libdir ${CMAKE_INSTALL_LIBDIR})
+set (datadir ${CMAKE_INSTALL_FULL_DATADIR})
+
compiz_plugin (unitymtgrabhandles PKGDEPS nux-4.0>=4.0.0 PLUGINDEPS composite opengl CFLAGSADD -std=c++0x)
if(revert_compiz)
diff --git a/plugins/unityshell/CMakeLists.txt b/plugins/unityshell/CMakeLists.txt
index 01a300589..b7e5b5f78 100644
--- a/plugins/unityshell/CMakeLists.txt
+++ b/plugins/unityshell/CMakeLists.txt
@@ -10,6 +10,11 @@ if(CMAKE_BUILD_TYPE STREQUAL "")
set(revert_compiz TRUE)
endif()
+set (libdir ${CMAKE_INSTALL_LIBDIR})
+set (includedir ${CMAKE_INSTALL_INCLUDEDIR})
+set (libdir ${CMAKE_INSTALL_LIBDIR})
+set (datadir ${CMAKE_INSTALL_FULL_DATADIR})
+
compiz_plugin (unityshell
PKGDEPS ${UNITY_PLUGIN_DEPS}
PLUGINDEPS composite opengl compiztoolbox scale
@@ -50,4 +55,4 @@ set_target_properties(unityshell
#
# Data
#
-install (FILES plugin-unityshell.png DESTINATION ${DATADIR}/ccsm/icons/hicolor/64x64/apps)
+install (FILES plugin-unityshell.png DESTINATION ${COMPIZ_DATADIR}/ccsm/icons/hicolor/64x64/apps)
diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt
index b80ec71ba..13a61716b 100644
--- a/services/CMakeLists.txt
+++ b/services/CMakeLists.txt
@@ -51,10 +51,10 @@ link_directories(${LIB_PATHS})
add_executable(unity-panel-service ${PANEL_SOURCES})
target_link_libraries(unity-panel-service ${LIBS})
-install(TARGETS unity-panel-service DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/unity/)
+install(TARGETS unity-panel-service DESTINATION ${CMAKE_INSTALL_LIBDIR}/unity/)
configure_file(unity-panel-service.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/share/upstart/sessions)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)
configure_file(unity-panel-service-lockscreen.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service-lockscreen.conf)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service-lockscreen.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/share/upstart/sessions)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service-lockscreen.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)
diff --git a/services/unity-panel-service-lockscreen.conf.in b/services/unity-panel-service-lockscreen.conf.in
index b6a3cb600..b9255d825 100644
--- a/services/unity-panel-service-lockscreen.conf.in
+++ b/services/unity-panel-service-lockscreen.conf.in
@@ -5,4 +5,4 @@ start on desktop-lock
stop on desktop-unlock
respawn
-exec ${CMAKE_INSTALL_PREFIX}/lib/unity/unity-panel-service --lockscreen-mode \ No newline at end of file
+exec ${CMAKE_INSTALL_FULL_LIBDIR}/unity/unity-panel-service --lockscreen-mode
diff --git a/services/unity-panel-service.conf.in b/services/unity-panel-service.conf.in
index 742e39b1f..62712f833 100644
--- a/services/unity-panel-service.conf.in
+++ b/services/unity-panel-service.conf.in
@@ -15,4 +15,4 @@ emits indicator-services-start
emits indicator-services-end
respawn
-exec ${CMAKE_INSTALL_PREFIX}/lib/unity/unity-panel-service
+exec ${CMAKE_INSTALL_FULL_LIBDIR}/unity/unity-panel-service
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 24dfc2280..e92776dd0 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,9 +1,8 @@
#
# Some unity tools
#
-install(FILES makebootchart.py PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/unity/)
+install(FILES makebootchart.py PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${CMAKE_INSTALL_LIBDIR}/unity)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/unity.cmake ${CMAKE_BINARY_DIR}/bin/unity)
install(FILES ${CMAKE_BINARY_DIR}/bin/unity PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
-GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION bin)
-
+GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp
index 23fa9601e..987fefcdb 100755
--- a/unity-shared/DashStyle.cpp
+++ b/unity-shared/DashStyle.cpp
@@ -46,7 +46,7 @@
#include "UnitySettings.h"
#include "config.h"
-#define DASH_WIDGETS_FILE DATADIR"/unity/themes/dash-widgets.json"
+#define DASH_WIDGETS_FILE UNITYDATADIR"/themes/dash-widgets.json"
namespace unity
{