summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-03-18 16:07:43 -0400
committerLouie S <louie@example.com>2024-03-18 16:07:43 -0400
commit4574b31b93f3f717c3956feb1f96ee00a7506440 (patch)
tree53041b17860f2d0d36e51706cc3cf0372d7110b2
parent28fd4ebfca32aacd53a17b9a6a92ba97011f2e3a (diff)
Add conditional install for desktop entry
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 682132b..1c5d6b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -101,8 +101,9 @@ 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)
+if(CMAKE_SYSTEM MATCHES "Linux.*")
+ 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)
+endif()