diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-06-20 18:44:26 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-06-20 18:44:26 -0500 |
commit | 3d4daff706c39fb6ebdd29b950f3f0ea1402116d (patch) | |
tree | 2f52ceb0273146624625f0c3e1114cd3f2990868 | |
parent | 59caa78d5ac6410fea8da709189f41fa86e6a2a7 (diff) | |
download | ayatana-indicator-session-3d4daff706c39fb6ebdd29b950f3f0ea1402116d.tar.gz ayatana-indicator-session-3d4daff706c39fb6ebdd29b950f3f0ea1402116d.tar.bz2 ayatana-indicator-session-3d4daff706c39fb6ebdd29b950f3f0ea1402116d.zip |
cmake: fix variables in data/CMakeLists.txt, make status messages more consistent
-rw-r--r-- | cmake/UseGSettings.cmake | 7 | ||||
-rw-r--r-- | data/CMakeLists.txt | 52 |
2 files changed, 38 insertions, 21 deletions
diff --git a/cmake/UseGSettings.cmake b/cmake/UseGSettings.cmake index 3d8ae1c..c8ea30c 100644 --- a/cmake/UseGSettings.cmake +++ b/cmake/UseGSettings.cmake @@ -15,12 +15,13 @@ 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}/share/glib-2.0/schemas/") + 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}/share/glib-2.0/schemas/") + SET (GSETTINGS_DIR "${_glib_prefix}/${SCHEMA_SUFFIX}") endif (GSETTINGS_LOCALINSTALL) # Run the validator and error if it fails @@ -32,7 +33,7 @@ macro(add_schema SCHEMA_NAME) endif (_schemas_invalid) # Actually install and recomple schemas - message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") + message (STATUS "${GSETTINGS_DIR} is the GSettings install dir") install (FILES ${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) if (GSETTINGS_COMPILE) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index de6942d..91f79a5 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -3,55 +3,71 @@ ## set (SCHEMA_NAME "com.canonical.indicator.session.gschema.xml") -set (SCHEMA_PATH "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}") -set (SCHEMA_PATH_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in") +set (SCHEMA_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}") +set (SCHEMA_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in") # generate the .xml file using intltool set (ENV{LC_ALL} "C") -execute_process (COMMAND intltool-merge -x -u --no-translations ${SCHEMA_PATH_IN} ${SCHEMA_PATH}) +execute_process (COMMAND intltool-merge -quiet --xml-style --utf8 --no-translations "${SCHEMA_FILE_IN}" "${SCHEMA_FILE}") # let UseGSettings do the rest -add_schema (${SCHEMA_PATH}) +add_schema (${SCHEMA_FILE}) ## ## DBus Service 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 () +message (STATUS "${DBUS_SERVICE_DIR} is the DBus Service File install dir") + set (SERVICE_NAME "${CMAKE_PROJECT_NAME}.service") -set (SERVICE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_NAME}") -set (SERVICE_PATH_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SERVICE_NAME}.in") +set (SERVICE_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_NAME}") +set (SERVICE_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SERVICE_NAME}.in") # build it set (pkglibexecdir "${PROJECT_LIBEXECDIR}") -configure_file ("${SERVICE_PATH_IN}" "${SERVICE_PATH}") +configure_file ("${SERVICE_FILE_IN}" "${SERVICE_FILE}") # install it -install (FILES ${SERVICE_PATH} DESTINATION ${DBUSSERVICEDIR}) +install (FILES "${SERVICE_FILE}" + DESTINATION "${DBUS_SERVICE_DIR}") ## ## Unity Indicator File ## +# where to install +set (UNITY_INDICATOR_DIR "${CMAKE_INSTALL_PREFIX}/share/unity/indicators") +message (STATUS "${UNITY_INDICATOR_DIR} is the Unity Indicator install dir") + set (UNITY_INDICATOR_NAME "com.canonical.indicator.session") -set (UNITY_INDICATOR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}") -set (UNITY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/unity") +set (UNITY_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}") -install (FILES ${UNITY_INDICATOR_PATH} DESTINATION "${UNITY_INSTALL_PREFIX}/indicators") +install (FILES "${UNITY_INDICATOR_FILE}" + DESTINATION "${UNITY_INDICATOR_DIR}") ## ## Icons ## -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() +# 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_DIR "${ICON_PREFIX}/hicolor") -message ("Installing icons to ${ICON_DIR}") +message (STATUS "${ICON_DIR} is the Icon install dir") + install (DIRECTORY icons - DESTINATION ${ICON_DIR} + DESTINATION "${ICON_DIR}" FILES_MATCHING PATTERN "*.png" PATTERN "*.svg") + |