forked from blue/squawk
macos fix
This commit is contained in:
parent
5d1f4cc36f
commit
39af2b06b6
@ -71,18 +71,23 @@ else (WIN32)
|
||||
endif (WIN32)
|
||||
|
||||
if (APPLE)
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/icns")
|
||||
execute_process(COMMAND convert -background none -resize "!16x16" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_16x16.png")
|
||||
execute_process(COMMAND convert -background none -resize "!32x32" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_16x16@2x.png")
|
||||
execute_process(COMMAND convert -background none -resize "!32x32" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_32x32.png")
|
||||
execute_process(COMMAND convert -background none -resize "!64x64" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_32x32@2x.png")
|
||||
execute_process(COMMAND convert -background none -resize "!128x128" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_128x128.png")
|
||||
execute_process(COMMAND convert -background none -resize "!256x256" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_128x128@2x.png")
|
||||
execute_process(COMMAND convert -background none -resize "!256x256" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_256x256.png")
|
||||
execute_process(COMMAND convert -background none -resize "!512x512" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_256x256@2x.png")
|
||||
execute_process(COMMAND convert -background none -resize "!512x512" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_512x512.png")
|
||||
execute_process(COMMAND convert -background none -resize "!1024x1024" squawk.svg "${CMAKE_CURRENT_BINARY_DIR}/icns/icon_512x512@2x.png")
|
||||
execute_process(COMMAND iconutil -c icns "icns" -o "squawk.icns" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/icns.iconset")
|
||||
execute_process(COMMAND which convert WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} RESULT_VARIABLE ret)
|
||||
message("AAA ${ret}")
|
||||
execute_process(COMMAND echo $PATH WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} RESULT_VARIABLE ret)
|
||||
message("AAA ${ret} $ENV{PATH}")
|
||||
execute_process(COMMAND convert -background none -size 16x16 squawk.svg icns.iconset/icon_16x16.png WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} RESULT_VARIABLE ret)
|
||||
message("AAA ${ret}")
|
||||
execute_process(COMMAND convert -background none -resize !32x32 squawk.svg "icns.iconset/icon_16x16@2x.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND convert -background none -resize !32x32 squawk.svg "icns.iconset/icon_32x32.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND convert -background none -resize !64x64 squawk.svg "icns.iconset/icon_32x32@2x.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND convert -background none -resize !128x128 squawk.svg "icns.iconset/icon_128x128.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND convert -background none -resize !256x256 squawk.svg "icns.iconset/icon_128x128@2x.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND convert -background none -resize !256x256 squawk.svg "icns.iconset/icon_256x256.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND convert -background none -resize !512x512 squawk.svg "icns.iconset/icon_256x256@2x.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND convert -background none -resize !512x512 squawk.svg "icns.iconset/icon_512x512.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND convert -background none -resize !1024x1024 squawk.svg "icns.iconset/icon_512x512@2x.png" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
execute_process(COMMAND iconutil -c icns "icns.iconset" -o "squawk.icns" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(MACOSX_BUNDLE_ICON_FILE squawk.icns)
|
||||
set(APP_ICON_MACOSX ${CMAKE_CURRENT_BINARY_DIR}/squawk.icns)
|
||||
set_source_files_properties(${APP_ICON_MACOSX} PROPERTIES
|
||||
|
Loading…
Reference in New Issue
Block a user