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 /data | |
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
Diffstat (limited to 'data')
-rw-r--r-- | data/CMakeLists.txt | 52 |
1 files changed, 34 insertions, 18 deletions
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") + |