From f2c731eb1b31f73a788cea789a267def25a04e06 Mon Sep 17 00:00:00 2001 From: Rico Tiongson Date: Sat, 18 Apr 2020 16:20:23 +0800 Subject: [PATCH] Update CMakeLists data --- .gitignore | 1 + CMakeLists.txt | 17 +++++++++++------ .../comfortable-swipe.conf | 0 {data => share}/comfortable-swipe.desktop | 5 ++--- 4 files changed, 14 insertions(+), 9 deletions(-) rename data/defaults.conf => share/comfortable-swipe.conf (100%) rename {data => share}/comfortable-swipe.desktop (75%) diff --git a/.gitignore b/.gitignore index f51bc44..e6b04f5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # Generated binary /comfortable-swipe +/build # CMake CMakeLists.txt.user diff --git a/CMakeLists.txt b/CMakeLists.txt index df0d0e6..56bfaa0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,8 +5,6 @@ project(comfortable-swipe) set(CMAKE_PROJECT_NAME "Comfortable Swipe") set(CMAKE_PROJECT_DESCRIPTION "Comfortable 3/4-finger swipe gestures") -# creat project properties - # set flags to use C++ 11 set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED True) @@ -18,6 +16,7 @@ set(comfortable_swipe_lib "${CMAKE_INSTALL_PREFIX}/lib") set(comfortable_swipe_share "${CMAKE_INSTALL_PREFIX}/share") set(comfortable_swipe_include "${CMAKE_INSTALL_PREFIX}/include") + # set version from VERSION file file(STRINGS "VERSION" comfortable_swipe_version) @@ -47,7 +46,13 @@ target_link_libraries(comfortable-swipe comfortable-swipe.lib) # perform installation install(TARGETS comfortable-swipe DESTINATION bin) -# set platform-specific tasks -set(CPACK_GENERATOR "DEB") -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Rico Tiongson ") #required -include(CPack) +# set where .desktop file should be installed +if (DEFINED ENV{XDG_CONFIG_HOME}) + set (comfortable_swipe_desktop "$ENV{XDG_CONFIG_HOME}/autostart/") +else() + set(comfortable_swipe_desktop "$ENV{HOME}/.config/autostart/") +endif() +install(FILES "share/comfortable-swipe.desktop" DESTINATION "${comfortable_swipe_desktop}") + +# set platform-specific info +include(cmake/cpack.cmake) diff --git a/data/defaults.conf b/share/comfortable-swipe.conf similarity index 100% rename from data/defaults.conf rename to share/comfortable-swipe.conf diff --git a/data/comfortable-swipe.desktop b/share/comfortable-swipe.desktop similarity index 75% rename from data/comfortable-swipe.desktop rename to share/comfortable-swipe.desktop index ba486b8..8c0c6ed 100644 --- a/data/comfortable-swipe.desktop +++ b/share/comfortable-swipe.desktop @@ -1,9 +1,8 @@ - [Desktop Entry] Type=Application +Name=Comfortable Swipe +Comment=Comfortable 3/4-finger swipe gestures Exec=comfortable-swipe start Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true -Name=Comfortable Swipe -Comment=3/4-finger touchpad gestures