From 30a1ef1690ff640d46d1369de8a72136eb3cc1c6 Mon Sep 17 00:00:00 2001 From: Juha Laukkanen Date: Wed, 23 Jul 2014 14:54:46 +0900 Subject: [PATCH] OSX bundle file generation with cmake. --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e37306e95b..f084ce17d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1469,8 +1469,13 @@ if(UNITTEST) endif() if (TargetBin) - if (IOS) - add_executable(${TargetBin} MACOSX_BUNDLE ${NativeAppSource}) + if (IOS OR APPLE) + set(ICON_PATH_ABS ${CMAKE_CURRENT_SOURCE_DIR}/assets/icon-114.icns) + set( MACOSX_BUNDLE_ICON_FILE icon-114.icns ) + set_source_files_properties(${ICON_PATH_ABS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") + #set( MACOSX_BUNDLE_ICON_FILE Resouces/icon-114.icns ) + #set_source_files_properties(assets PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") + add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAppSource}) else() add_executable(${TargetBin} ${NativeAppSource}) endif()