Skip to content

Commit

Permalink
Merge pull request #398 from yungyuc/fix/macos-app-icon
Browse files Browse the repository at this point in the history
Fix the missing application icon under macos
  • Loading branch information
yungyuc authored Jul 31, 2024
2 parents fde3636 + 79d4cef commit 85d1f75
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions cpp/binary/viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added resources/viewer/solvcon.icns
Binary file not shown.

0 comments on commit 85d1f75

Please sign in to comment.