Update CMakeLists data

This commit is contained in:
Rico Tiongson 2020-04-18 16:20:23 +08:00
parent 69c4649f04
commit f2c731eb1b
4 changed files with 14 additions and 9 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
# Generated binary # Generated binary
/comfortable-swipe /comfortable-swipe
/build
# CMake # CMake
CMakeLists.txt.user CMakeLists.txt.user

View File

@ -5,8 +5,6 @@ project(comfortable-swipe)
set(CMAKE_PROJECT_NAME "Comfortable Swipe") set(CMAKE_PROJECT_NAME "Comfortable Swipe")
set(CMAKE_PROJECT_DESCRIPTION "Comfortable 3/4-finger swipe gestures") set(CMAKE_PROJECT_DESCRIPTION "Comfortable 3/4-finger swipe gestures")
# creat project properties
# set flags to use C++ 11 # set flags to use C++ 11
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True) 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_share "${CMAKE_INSTALL_PREFIX}/share")
set(comfortable_swipe_include "${CMAKE_INSTALL_PREFIX}/include") set(comfortable_swipe_include "${CMAKE_INSTALL_PREFIX}/include")
# set version from VERSION file # set version from VERSION file
file(STRINGS "VERSION" comfortable_swipe_version) file(STRINGS "VERSION" comfortable_swipe_version)
@ -47,7 +46,13 @@ target_link_libraries(comfortable-swipe comfortable-swipe.lib)
# perform installation # perform installation
install(TARGETS comfortable-swipe DESTINATION bin) install(TARGETS comfortable-swipe DESTINATION bin)
# set platform-specific tasks # set where .desktop file should be installed
set(CPACK_GENERATOR "DEB") if (DEFINED ENV{XDG_CONFIG_HOME})
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Rico Tiongson <thericotiongson@gmail.com>") #required set (comfortable_swipe_desktop "$ENV{XDG_CONFIG_HOME}/autostart/")
include(CPack) 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)

View File

@ -1,9 +1,8 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=Comfortable Swipe
Comment=Comfortable 3/4-finger swipe gestures
Exec=comfortable-swipe start Exec=comfortable-swipe start
Hidden=false Hidden=false
NoDisplay=false NoDisplay=false
X-GNOME-Autostart-enabled=true X-GNOME-Autostart-enabled=true
Name=Comfortable Swipe
Comment=3/4-finger touchpad gestures