From 28fd4ebfca32aacd53a17b9a6a92ba97011f2e3a Mon Sep 17 00:00:00 2001 From: Louie S Date: Mon, 18 Mar 2024 15:51:50 -0400 Subject: Basic Linux install target working --- .gitignore | 1 + CMakeLists.txt | 9 +++++++++ data/assignment-list.desktop | 7 ------- data/assignment-list.desktop.in | 8 ++++++++ 4 files changed, 18 insertions(+), 7 deletions(-) delete mode 100644 data/assignment-list.desktop create mode 100644 data/assignment-list.desktop.in diff --git a/.gitignore b/.gitignore index 517f101..456fc17 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ build compile_commands.json config.h +data/assignment-list.desktop diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a87c05..682132b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,3 +97,12 @@ add_executable(assignment-list set_target_properties(assignment-list PROPERTIES WIN32_EXECUTABLE ON) target_link_libraries(assignment-list ${qt_libraries}) + +# Installation +install(TARGETS assignment-list) + +# TODO make conditional only for linux +# install desktop entry and icon +configure_file(data/assignment-list.desktop.in ${CMAKE_CURRENT_SOURCE_DIR}/data/assignment-list.desktop @ONLY) +install(FILES data/assignment-list.desktop DESTINATION share/applications) +install(FILES data/assignment-list.svg DESTINATION share/pixmaps) diff --git a/data/assignment-list.desktop b/data/assignment-list.desktop deleted file mode 100644 index 79c5bf6..0000000 --- a/data/assignment-list.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=assignment-list -Comment=Assignment List Qt -Exec=assignment-list -Icon=assignment-list -Categories=Utility diff --git a/data/assignment-list.desktop.in b/data/assignment-list.desktop.in new file mode 100644 index 0000000..1fbe91a --- /dev/null +++ b/data/assignment-list.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=@PROJECT_NAME@ +Comment=Assignment List Qt +Path=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/@PROJECT_NAME@ +Exec=@PROJECT_NAME@ +Icon=assignment-list +Categories=Utility -- cgit