summary refs log tree commit diff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-01-23 21:11:00 -0500
committerJune McEnroe <june@causal.agency>2022-01-23 21:11:00 -0500
commit519ec0b62450e2d4eb5adb04fe72f18a83aad564 (patch)
tree34a32e042d3dadbab00b75eb83ad7642a4b0ea02 /CMakeLists.txt
parentAdd icons to Windows and macOS apps (diff)
downloadwep-519ec0b62450e2d4eb5adb04fe72f18a83aad564.tar.gz
wep-519ec0b62450e2d4eb5adb04fe72f18a83aad564.zip
Upscale icons for macOS
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 17 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cbdc2e..bc9e0d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,23 +90,27 @@ foreach(game ${games})
 		VERBATIM
 	)
 	if(APPLE)
-		add_custom_command(
-			OUTPUT ${shouting}.PNG
-			COMMAND ico2png ${shouting}.ICO
-			DEPENDS ${shouting}.ICO
-			VERBATIM
-		)
 		file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${game}.iconset)
-		add_custom_command(
-			OUTPUT ${game}.iconset/icon_32x32.png
-			COMMAND cp ${shouting}.PNG ${game}.iconset/icon_32x32.png
-			DEPENDS ${shouting}.PNG
-			VERBATIM
-		)
+		foreach(scale 1 2 4 8 16)
+			math(EXPR size "32 * ${scale}")
+			add_custom_command(
+				OUTPUT ${game}.iconset/icon_${size}x${size}.png
+				COMMAND ico2png
+					${shouting}.ICO ${scale}x
+					${game}.iconset/icon_${size}x${size}.png
+				DEPENDS ${shouting}.ICO
+				VERBATIM
+			)
+		endforeach()
 		add_custom_command(
 			OUTPUT ${game}.icns
 			COMMAND iconutil -c icns ${game}.iconset
-			DEPENDS ${game}.iconset/icon_32x32.png
+			DEPENDS
+				${game}.iconset/icon_32x32.png
+				${game}.iconset/icon_64x64.png
+				${game}.iconset/icon_128x128.png
+				${game}.iconset/icon_256x256.png
+				${game}.iconset/icon_512x512.png
 			VERBATIM
 		)
 		target_sources(${game} PRIVATE ${game}.icns)
117ce342692e45fdebdb3&follow=1'>Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe