aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-28 17:06:26 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-28 17:06:26 -0500
commit0180339dd65daa9878b93e06ad8da3742999dd3d (patch)
tree8ff708bb45c501bca5341daae02ea0a9c630d547 /cmake
parentf79e660887abb06169bc6e9b5972ca8dae457357 (diff)
downloadayatana-indicator-session-0180339dd65daa9878b93e06ad8da3742999dd3d.tar.gz
ayatana-indicator-session-0180339dd65daa9878b93e06ad8da3742999dd3d.tar.bz2
ayatana-indicator-session-0180339dd65daa9878b93e06ad8da3742999dd3d.zip
remove localinstall mode
Diffstat (limited to 'cmake')
-rw-r--r--cmake/UseGSettings.cmake31
1 files changed, 5 insertions, 26 deletions
diff --git a/cmake/UseGSettings.cmake b/cmake/UseGSettings.cmake
index c8ea30c..4050b53 100644
--- a/cmake/UseGSettings.cmake
+++ b/cmake/UseGSettings.cmake
@@ -1,32 +1,13 @@
# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them.
-option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ${LOCAL_INSTALL})
-
-option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL})
-
-if(GSETTINGS_LOCALINSTALL)
- message(STATUS "GSettings schemas will be installed locally.")
-endif()
-
-if(GSETTINGS_COMPILE)
- message(STATUS "GSettings shemas will be compiled.")
-endif()
-
macro(add_schema SCHEMA_NAME)
set(PKG_CONFIG_EXECUTABLE pkg-config)
- set(SCHEMA_SUFFIX "share/glib-2.0/schemas")
- # Have an option to not install the schema into where GLib is
- if (GSETTINGS_LOCALINSTALL)
- SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/${SCHEMA_SUFFIX}")
- 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}/${SCHEMA_SUFFIX}")
- endif (GSETTINGS_LOCALINSTALL)
+ set(GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas")
# 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=${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_compile_schemas OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND ${_glib_compile_schemas} --dry-run --schema-file=${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
if (_schemas_invalid)
message (SEND_ERROR "Schema validation error: ${_schemas_invalid}")
@@ -36,9 +17,7 @@ macro(add_schema SCHEMA_NAME)
message (STATUS "${GSETTINGS_DIR} is the GSettings install dir")
install (FILES ${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL)
- if (GSETTINGS_COMPILE)
- install (CODE "message (STATUS \"Compiling GSettings schemas\")")
- install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})")
- endif ()
+ install (CODE "message (STATUS \"Compiling GSettings schemas\")")
+ install (CODE "execute_process (COMMAND ${_glib_compile_schemas} ${GSETTINGS_DIR})")
endmacro()