From 6def7fceae5ea55e6d44ede05146f6a95add317c Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 20 Jun 2013 17:31:07 -0500 Subject: install .schema.xml and indicator-session-service in the right places. --- data/CMakeLists.txt | 66 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 24 deletions(-) (limited to 'data/CMakeLists.txt') diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 84fe66c..d8f338b 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,24 +1,42 @@ -# schema -configure_file (com.canonical.indicator.session.gschema.xml.in - com.canonical.indicator.session.gschema.xml) -include (GSettings) -add_schemas(clinica-schemas ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.session.gschema.xml) - -# .service file -set(SERVICE_NAME "indicator-session.service") -set(SERVICE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_NAME}") -set(pkglibexecdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/indicator-session") -configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/${SERVICE_NAME}.in" "${SERVICE_PATH}") -install (FILES ${SERVICE_PATH} - DESTINATION ${DBUSSERVICEDIR}) - -# .indicator file -install(FILES com.canonical.indicator.session - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/unity/indicators) - -# FIXME install files -# -#install(FILES -#datetime-dialog.ui -#DESTINATION share/indicatore-datetime # FIXME this too. -#) +## +## GSettings schema +## + +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") + +# 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}) + +# let UseGSettings do the rest +add_schema (${SCHEMA_PATH}) + + +## +## DBus Service File +## + +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") + +# build it +set (pkglibexecdir "${PROJECT_LIBEXECDIR}") +configure_file ("${SERVICE_PATH_IN}" "${SERVICE_PATH}") + +# install it +install (FILES ${SERVICE_PATH} DESTINATION ${DBUSSERVICEDIR}) + + +## +## Unity Indicator File +## + +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") + +install (FILES ${UNITY_INDICATOR_PATH} DESTINATION "${UNITY_INSTALL_PREFIX}/indicators") + -- cgit v1.2.3