From c8de14045e6165a865f5bd1a674af360975aecd3 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 26 Jan 2022 22:46:45 +0100 Subject: src/CMakeLists.txt: Use pkg-config's indicatordir as library installation path. --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 66b86ad..3220d0a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,7 +88,8 @@ target_include_directories("ayatana-application" PUBLIC ${PROJECT_DEPS_INCLUDE_D target_include_directories("ayatana-application" PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries("ayatana-application" ${PROJECT_DEPS_LIBRARIES}) add_dependencies("ayatana-application" "src-generated") -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-application.so" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/ayatana-indicators3/7") +pkg_get_variable(indicatordir "ayatana-indicator3-0.4" "indicatordir") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-application.so" DESTINATION "${indicatordir}") # ayatana-indicator-application-service -- cgit v1.2.3 From a986a42c82e4c3f62d4bc19868ee518d973e3483 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 26 Jan 2022 22:42:03 +0100 Subject: CMakeLists.txt: Fix project name (ayatana-indicator-application, not ayatana-appindicator-application). --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d3fb09..6cb7f5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.13) -project(ayatana-appindicator-application C) +project(ayatana-indicator-application C) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE) @@ -33,7 +33,7 @@ pkg_check_modules(PROJECT_DEPS REQUIRED glib-2.0>=2.58 ayatana-indicator3-0.4>=0 include(GNUInstallDirs) set(PROJECT_VERSION "0.8.90") -set(PROJECT_NAME "ayatana-appindicator-application") +set(PROJECT_NAME "ayatana-indicator-application") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") -- cgit v1.2.3 From 3c432ed173f40a2bc8383f432185616714c4ea96 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 26 Jan 2022 22:43:29 +0100 Subject: data/CMakeLists.txt: Update detection of SYSTEMD_USER_DIR, use systemd's pkg-config variable if possible. --- data/CMakeLists.txt | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 21f7cba..867db2f 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,19 +1,38 @@ # ayatana-indicator-application.service -pkg_check_modules(SYSTEMD systemd) +########################### +# Systemd Job +########################### +pkg_check_modules(SYSTEMD systemd) if (${SYSTEMD_FOUND}) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator-application.service.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-application.service" @ONLY) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-application.service" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/systemd/user") + + # where to install + pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir) + message (STATUS "${SYSTEMD_USER_DIR} is the systemd user unit file install dir") + + set (SYSTEMD_USER_NAME "${CMAKE_PROJECT_NAME}.service") + set (SYSTEMD_USER_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SYSTEMD_USER_NAME}") + set (SYSTEMD_USER_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SYSTEMD_USER_NAME}.in") + + # build it + set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}") + configure_file ("${SYSTEMD_USER_FILE_IN}" "${SYSTEMD_USER_FILE}") + + # install it + install (FILES "${SYSTEMD_USER_FILE}" + DESTINATION "${SYSTEMD_USER_DIR}") endif() -# ayatana-indicator-application.desktop +########################### +# XDG Autostart +########################### configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator-application.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-application.desktop" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-application.desktop" DESTINATION "/etc/xdg/autostart") +########################### # ordering-override.keyfile +########################### install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ordering-override.keyfile" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/ayatana-indicator-application") - - -- cgit v1.2.3