diff --git a/cpp/binary/viewer/CMakeLists.txt b/cpp/binary/viewer/CMakeLists.txt index 902d0dc0..bf9aa47e 100644 --- a/cpp/binary/viewer/CMakeLists.txt +++ b/cpp/binary/viewer/CMakeLists.txt @@ -25,10 +25,23 @@ find_package(Qt6 COMPONENTS 3DRender) find_package(Qt6 COMPONENTS 3DInput) find_package(Qt6 COMPONENTS 3DExtras) -qt_add_executable( - viewer - viewer.cpp -) +if(APPLE) + set(MACOSX_BUNDLE_ICON_FILE solvcon.icns) + set(app_icon_macos ${PROJECT_ROOT_DIR}/resources/viewer/solvcon.icns) + set_source_files_properties(${app_icon_macos} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") + + qt_add_executable( + viewer + MACOSX_BUNDLE + viewer.cpp + ${app_icon_macos} + ) +else() + qt_add_executable( + viewer + viewer.cpp + ) +endif() target_link_libraries( viewer PUBLIC diff --git a/resources/viewer/solvcon.icns b/resources/viewer/solvcon.icns new file mode 100644 index 00000000..c450b019 Binary files /dev/null and b/resources/viewer/solvcon.icns differ