summaryrefslogtreecommitdiff
diff options
-rw-r--r--CMakeLists.txt44
-rw-r--r--data/CMakeLists.txt27
-rw-r--r--data/com.canonical.Unity.gschema.xml (renamed from com.canonical.Unity.gschema.xml)0
-rw-r--r--data/unity7.conf.in (renamed from unity7.conf.in)0
4 files changed, 33 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d801620dd..1a53336b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,6 +180,10 @@ set (INDICATOR_SERVICE_DIR "${INDICATORPREFIX}/share/${PROJECT_NAME}/indicators"
configure_file (${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
+# GSettings Schema
+SET (UNITY_SCHEMAS "com.canonical.Unity.gschema.xml")
+SET (UNITY_TEST_SCHEMAS "external.gschema.xml")
+
#
# i18n
#
@@ -362,43 +366,13 @@ else (ENABLE_UNIT_TESTS)
add_custom_target (gcheck COMMAND echo ${MISSING_TESTS_MSG})
endif (ENABLE_UNIT_TESTS)
-#
-# GSettings Schema
-#
-SET (UNITY_SCHEMAS "com.canonical.Unity.gschema.xml")
-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_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/")
-endif (GSETTINGS_LOCALINSTALL)
-
-# Run the validator and error if it fails
-execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_SCHEMAS} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-if (_schemas_invalid)
- message (SEND_ERROR "Schema validation error: ${_schemas_invalid}")
-endif (_schemas_invalid)
-
-# Actually install and recomple schemas
-message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}")
-install (FILES ${UNITY_SCHEMAS} DESTINATION ${GSETTINGS_DIR} OPTIONAL)
-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_DATADIR}/${PROJECT_NAME}/themes)
file (GLOB _datafiles "${CMAKE_CURRENT_SOURCE_DIR}/resources/*")
install (FILES ${_datafiles} DESTINATION ${PKGDATADIR})
-
-# For testing
-configure_file (${CMAKE_SOURCE_DIR}/${UNITY_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_SCHEMAS})
+# Settings for testing
+configure_file (${CMAKE_SOURCE_DIR}/data/${UNITY_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_SCHEMAS})
configure_file (${CMAKE_SOURCE_DIR}/tests/data/${UNITY_TEST_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_TEST_SCHEMAS})
execute_process (COMMAND ${_glib_comple_schemas} ${CMAKE_BINARY_DIR}/settings)
@@ -426,9 +400,3 @@ if (DOXYGEN_FOUND STREQUAL "YES")
ADDITIONAL_MAKE_CLEAN_FILES api-doc)
endif (DOXYGEN_FOUND STREQUAL "YES")
-
-#
-# Upstart
-#
-configure_file(unity7.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index bae9119aa..17b61b6e5 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1 +1,28 @@
add_subdirectory(pam)
+
+# 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_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/")
+endif (GSETTINGS_LOCALINSTALL)
+
+# Run the validator and error if it fails
+execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_SCHEMAS} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+if (_schemas_invalid)
+ message (SEND_ERROR "Schema validation error: ${_schemas_invalid}")
+endif (_schemas_invalid)
+
+# Actually install and recomple schemas
+message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}")
+install (FILES ${UNITY_SCHEMAS} DESTINATION ${GSETTINGS_DIR} OPTIONAL)
+install (CODE "message (STATUS \"Compiling GSettings schemas\")")
+install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})")
+
+# Upstart
+configure_file(unity7.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)
diff --git a/com.canonical.Unity.gschema.xml b/data/com.canonical.Unity.gschema.xml
index bfeeb7dad..bfeeb7dad 100644
--- a/com.canonical.Unity.gschema.xml
+++ b/data/com.canonical.Unity.gschema.xml
diff --git a/unity7.conf.in b/data/unity7.conf.in
index e465df919..e465df919 100644
--- a/unity7.conf.in
+++ b/data/unity7.conf.in