aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--asteroid-compass.desktop.template2
-rwxr-xr-xasteroid-compass.in3
-rw-r--r--src/CMakeLists.txt4
4 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a7ab72..3b27f88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,13 @@ ecm_find_qmlmodule(QtSensors 5.3)
add_subdirectory(src)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/asteroid-compass.in
+ ${CMAKE_BINARY_DIR}/asteroid-compass
+ @ONLY)
+
+install(PROGRAMS ${CMAKE_BINARY_DIR}/asteroid-compass
+ DESTINATION ${CMAKE_INSTALL_BINDIR})
+
build_translations(i18n)
generate_desktop(${CMAKE_SOURCE_DIR} asteroid-compass)
diff --git a/asteroid-compass.desktop.template b/asteroid-compass.desktop.template
index 9461686..180fab0 100644
--- a/asteroid-compass.desktop.template
+++ b/asteroid-compass.desktop.template
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Categories=Applications;
-Exec=invoker --single-instance --type=qtcomponents-qt5 /usr/bin/asteroid-compass
+Exec=asteroid-compass
Icon=ios-compass-outline
X-Asteroid-Center-Color=#29A600
X-Asteroid-Outer-Color=#070C00
diff --git a/asteroid-compass.in b/asteroid-compass.in
new file mode 100755
index 0000000..77c198c
--- /dev/null
+++ b/asteroid-compass.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec invoker --single-instance --type=qtcomponents-qt5 @CMAKE_INSTALL_FULL_LIBDIR@/asteroid-compass.so
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a9ef740..b5930c5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,8 +1,8 @@
add_library(asteroid-compass main.cpp resources.qrc)
-set_target_properties(asteroid-compass PROPERTIES PREFIX "" SUFFIX "")
+set_target_properties(asteroid-compass PROPERTIES PREFIX "")
target_link_libraries(asteroid-compass PUBLIC
AsteroidApp)
install(TARGETS asteroid-compass
- DESTINATION ${CMAKE_INSTALL_BINDIR})
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})