From 4378f4886adc2136010f9c1f5f44fb74b0461fa8 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Mon, 1 Dec 2014 10:09:30 +0100 Subject: [PATCH] Add application icon into the executable bundle --- ApplicationCode/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index 70d234530f..843cd0b6da 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -226,6 +226,18 @@ set( EXE_FILES add_executable( ResInsight ${EXE_FILES} ) +# Application icon for MacOS X bundle +if (APPLE) + add_custom_command (OUTPUT Resources/ResInsight.icns + COMMAND sips -s format icns ${CMAKE_CURRENT_SOURCE_DIR}/Resources/AppLogo48x48.png --out ${CMAKE_CURRENT_BINARY_DIR}/Resources/ResInsight.icns + COMMENT Converting application icon + ) + add_custom_target (ResInsight-icns + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Resources/ResInsight.icns) + add_dependencies (ResInsight ResInsight-icns) + set_target_properties (ResInsight PROPERTIES + MACOSX_BUNDLE_ICON_FILE ${CMAKE_CURRENT_BINARY_DIR}/Resources/ResInsight.icns) +endif () set( LINK_LIBRARIES WellPathImportSsihub