diff --git a/Build/iOS/JoltViewerInfo.plist b/Build/iOS/JoltViewerInfo.plist
index 8eb9bd3b1..72ea9be7f 100644
--- a/Build/iOS/JoltViewerInfo.plist
+++ b/Build/iOS/JoltViewerInfo.plist
@@ -9,7 +9,7 @@
CFBundleGetInfoString
CFBundleIconFile
-
+ icon.icns
CFBundleIdentifier
com.joltphysics.joltviewer
CFBundleInfoDictionaryVersion
diff --git a/Build/iOS/SamplesInfo.plist b/Build/iOS/SamplesInfo.plist
index b864ab5a2..dfe0e8b9d 100644
--- a/Build/iOS/SamplesInfo.plist
+++ b/Build/iOS/SamplesInfo.plist
@@ -9,7 +9,7 @@
CFBundleGetInfoString
CFBundleIconFile
-
+ icon.icns
CFBundleIdentifier
com.joltphysics.samples
CFBundleInfoDictionaryVersion
diff --git a/Build/macOS/icon.icns b/Build/macOS/icon.icns
new file mode 100644
index 000000000..3789007f1
Binary files /dev/null and b/Build/macOS/icon.icns differ
diff --git a/JoltViewer/JoltViewer.cmake b/JoltViewer/JoltViewer.cmake
index b32fdb116..65a504df5 100644
--- a/JoltViewer/JoltViewer.cmake
+++ b/JoltViewer/JoltViewer.cmake
@@ -13,7 +13,11 @@ source_group(TREE ${JOLT_VIEWER_ROOT} FILES ${JOLT_VIEWER_SRC_FILES})
# Create JoltViewer executable
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
- add_executable(JoltViewer MACOSX_BUNDLE ${JOLT_VIEWER_SRC_FILES} ${TEST_FRAMEWORK_ASSETS})
+ # Icon
+ set(JPH_ICON "${CMAKE_CURRENT_SOURCE_DIR}/macOS/icon.icns")
+ set_source_files_properties(${JPH_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
+
+ add_executable(JoltViewer MACOSX_BUNDLE ${JOLT_VIEWER_SRC_FILES} ${TEST_FRAMEWORK_ASSETS} ${JPH_ICON})
set_property(TARGET JoltViewer PROPERTY MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/iOS/JoltViewerInfo.plist")
set_property(TARGET JoltViewer PROPERTY XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.joltphysics.joltviewer")
else()
diff --git a/Samples/Samples.cmake b/Samples/Samples.cmake
index 2fd18897c..90c667c14 100644
--- a/Samples/Samples.cmake
+++ b/Samples/Samples.cmake
@@ -333,8 +333,12 @@ source_group(TREE ${SAMPLES_ROOT} FILES ${SAMPLES_SRC_FILES})
# Create Samples executable
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
+ # Icon
+ set(JPH_ICON "${CMAKE_CURRENT_SOURCE_DIR}/macOS/icon.icns")
+ set_source_files_properties(${JPH_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
+
# macOS configuration
- add_executable(Samples MACOSX_BUNDLE ${SAMPLES_SRC_FILES} ${TEST_FRAMEWORK_ASSETS} ${SAMPLES_ASSETS})
+ add_executable(Samples MACOSX_BUNDLE ${SAMPLES_SRC_FILES} ${TEST_FRAMEWORK_ASSETS} ${SAMPLES_ASSETS} ${JPH_ICON})
# Make sure that all samples assets move to the Resources folder in the package
foreach(ASSET_FILE ${SAMPLES_ASSETS})