From 3e81a075632a1b5572b441e90581dc2b9a26727e Mon Sep 17 00:00:00 2001 From: Aang23 Date: Fri, 12 Feb 2021 00:03:30 +0100 Subject: [PATCH] Generate a Linux desktop icon --- CMakeLists.txt | 4 +++- cmake_uninstall.cmake.in => cmake_uninstall.cmake | 0 sdrpp.desktop | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) rename cmake_uninstall.cmake.in => cmake_uninstall.cmake (100%) create mode 100644 sdrpp.desktop diff --git a/CMakeLists.txt b/CMakeLists.txt index 7360e7ff..47f84cef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,9 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/bandplans DESTINATION share/sdrpp install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/colormaps DESTINATION share/sdrpp) install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/fonts DESTINATION share/sdrpp) install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/icons DESTINATION share/sdrpp) +configure_file(${CMAKE_SOURCE_DIR}/sdrpp.desktop ${CMAKE_CURRENT_BINARY_DIR}/sdrpp.desktop @ONLY) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/sdrpp.desktop DESTINATION share/applications) # Create uninstall target -configure_file(${CMAKE_SOURCE_DIR}/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) +configure_file(${CMAKE_SOURCE_DIR}/cmake_uninstall.cmake ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) add_custom_target(uninstall ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) \ No newline at end of file diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake similarity index 100% rename from cmake_uninstall.cmake.in rename to cmake_uninstall.cmake diff --git a/sdrpp.desktop b/sdrpp.desktop new file mode 100644 index 00000000..b7c628ca --- /dev/null +++ b/sdrpp.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Exec=@CMAKE_INSTALL_PREFIX@/bin/sdrpp +Name=SDR++ +Icon=@CMAKE_INSTALL_PREFIX@/share/sdrpp/icons/sdrpp.png \ No newline at end of file