aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rwxr-xr-xbuild.sh2
-rw-r--r--cmake/UseGSettings.cmake31
-rw-r--r--data/CMakeLists.txt12
4 files changed, 8 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1299319..875de0f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,6 @@ set (GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
option (enable_tests "Build the package's automatic tests." ON)
option (full_warnings "Full compiler warnings." ON)
option (enable_lcov "Generate lcov code coverage reports." ON)
-option (LOCAL_INSTALL "Support local installation." OFF)
find_package(PkgConfig REQUIRED)
include (GNUInstallDirs)
diff --git a/build.sh b/build.sh
index c98285e..b69687c 100755
--- a/build.sh
+++ b/build.sh
@@ -13,6 +13,6 @@ fi
echo "Using $BUILD_COMMAND to build"
(
cd build
- cmake .. $EXTRA_ARGS -DCMAKE_INSTALL_PREFIX=../../install -DLOCAL_INSTALL=ON -DCMAKE_BUILD_TYPE=Debug
+ cmake .. $EXTRA_ARGS -DCMAKE_INSTALL_PREFIX=../../install -DCMAKE_BUILD_TYPE=Debug
$BUILD_COMMAND
)
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()
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 6700163..6eb257c 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -19,11 +19,7 @@ add_schema (${SCHEMA_FILE})
##
# where to install
-if (${LOCAL_INSTALL})
- set (DBUS_SERVICE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/dbus-1/services")
-else ()
- EXEC_PROGRAM (${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable session_bus_services_dir OUTPUT_VARIABLE DBUS_SERVICE_DIR)
-endif ()
+set (DBUS_SERVICE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/dbus-1/services")
message (STATUS "${DBUS_SERVICE_DIR} is the DBus Service File install dir")
set (SERVICE_NAME "${CMAKE_PROJECT_NAME}.service")
@@ -59,11 +55,7 @@ install (FILES "${UNITY_INDICATOR_FILE}"
##
# where to install
-if (${LOCAL_INSTALL})
- set (ICON_PREFIX "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/libindicator/icons")
-else ()
- EXEC_PROGRAM (${PKG_CONFIG_EXECUTABLE} ARGS indicator3-0.4 --variable iconsdir OUTPUT_VARIABLE ICON_PREFIX)
-endif ()
+set (ICON_PREFIX "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/libindicator/icons")
set (ICON_DIR "${ICON_PREFIX}/hicolor")
message (STATUS "${ICON_DIR} is the Icon install dir")