Generate icns file with cmake (#201)
This commit is contained in:
parent
1cfa8cc339
commit
598faac7ef
2 changed files with 19 additions and 4 deletions
|
|
@ -1281,9 +1281,20 @@ elseif (APPLE)
|
|||
target_link_libraries(Telegram PRIVATE desktop-app::external_iconv)
|
||||
endif()
|
||||
|
||||
set(icons_path ${CMAKE_CURRENT_SOURCE_DIR}/Telegram/Images.xcassets)
|
||||
set_target_properties(Telegram PROPERTIES RESOURCE ${icons_path})
|
||||
target_sources(Telegram PRIVATE ${icons_path})
|
||||
set(appicon_path ${CMAKE_CURRENT_SOURCE_DIR}/Telegram/Images.xcassets/Icon.iconset)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT AppIcon.icns
|
||||
COMMAND iconutil
|
||||
ARGS
|
||||
--convert icns
|
||||
--output AppIcon.icns
|
||||
${appicon_path}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
set_source_files_properties(AppIcon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
target_sources(Telegram PRIVATE AppIcon.icns)
|
||||
|
||||
set(lang_packs
|
||||
en
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
<string>@output_name@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Telegram Desktop messaging app</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>AppIcon</string>
|
||||
<key>CFBundleIconName</key>
|
||||
<string>AppIcon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>@bundle_identifier@</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
|
@ -20,7 +24,7 @@
|
|||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>CFBundleURLIconFile</key>
|
||||
<string>Icon.icns</string>
|
||||
<string>AppIcon</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>@bundle_identifier@</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue