From fcb4541a05ea068715c8815c0294d2638721b071 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 29 Oct 2014 11:38:48 -0400 Subject: [PATCH 1/2] QtDialog: don't install desktop file bits on Apple Apple uses the dmg file which doesn't have .desktop support. --- Source/QtDialog/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 03c2fb42b..feedcc9d9 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -171,7 +171,7 @@ set(CMAKE_INSTALL_DESTINATION_ARGS install(TARGETS cmake-gui RUNTIME DESTINATION bin ${CMAKE_INSTALL_DESTINATION_ARGS}) -if(UNIX) +if(UNIX AND NOT APPLE) # install a desktop file so CMake appears in the application start menu # with an icon install(FILES CMake.desktop DESTINATION share/applications ) From fb13502fca5a344dd35be6fc919ae7e89ce9c6ea Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 29 Oct 2014 11:39:27 -0400 Subject: [PATCH 2/2] QtDialog: install the 128x128 icon Also only install the icons to the icons directory. --- Source/QtDialog/CMake.desktop | 2 +- Source/QtDialog/CMakeLists.txt | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/QtDialog/CMake.desktop b/Source/QtDialog/CMake.desktop index 7be495f99..842091f5b 100644 --- a/Source/QtDialog/CMake.desktop +++ b/Source/QtDialog/CMake.desktop @@ -3,7 +3,7 @@ Version=1.0 Name=CMake Comment=Cross-platform buildsystem Exec=cmake-gui %f -Icon=CMakeSetup32 +Icon=CMakeSetup Terminal=false X-MultipleArgs=false Type=Application diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index feedcc9d9..b59af94bd 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -172,10 +172,16 @@ set(CMAKE_INSTALL_DESTINATION_ARGS install(TARGETS cmake-gui RUNTIME DESTINATION bin ${CMAKE_INSTALL_DESTINATION_ARGS}) if(UNIX AND NOT APPLE) + foreach (size IN ITEMS 32 128) + install( + FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetup${size}.png" + DESTINATION "share/icons/hicolor/${size}x${size}/apps" + RENAME "CMakeSetup.png") + endforeach () + # install a desktop file so CMake appears in the application start menu # with an icon install(FILES CMake.desktop DESTINATION share/applications ) - install(FILES CMakeSetup32.png DESTINATION share/pixmaps ) install(FILES cmakecache.xml DESTINATION share/mime/packages ) endif()