Skip to content

Commit

Permalink
Add MacOS icon
Browse files Browse the repository at this point in the history
  • Loading branch information
rnayabed committed Feb 27, 2023
1 parent ec87658 commit 5ce522c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Binary file added icons/rangoli.icns
Binary file not shown.
13 changes: 12 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ set(SOURCE_LIST
startatboot.h startatboot.cpp
)

set(MACOS_APP_ICON "${CMAKE_SOURCE_DIR}/icons/rangoli.icns")

if (WIN32)
list(APPEND SOURCE_LIST icon_windows.rc)
elseif(APPLE)
list(APPEND SOURCE_LIST ${MACOS_APP_ICON})
endif()

qt_add_executable(rangoli ${SOURCE_LIST})
Expand All @@ -57,13 +61,20 @@ qt_add_qml_module(rangoli
)

set_target_properties(rangoli PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER io.github.rnayabed.rangoli
MACOSX_BUNDLE_BUNDLE_NAME Rangoli
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_COPYRIGHT "Debayan Sutradhar"
MACOSX_BUNDLE_GUI_IDENTIFIER io.github.rnayabed.rangoli
MACOSX_BUNDLE_ICON_FILE rangoli.icns
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)

set_source_files_properties(${MACOS_APP_ICON} PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources"
)

# Add extra compiler flags supported by GCC
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(rangoli PRIVATE -Wpessimizing-move -Wpedantic)
Expand Down

0 comments on commit 5ce522c

Please sign in to comment.