cmake: Automatically generate icon file for Vita as a fallback

This commit is contained in:
Sebastian Krzyszkowiak 2021-07-25 05:43:20 +02:00
parent 0833e66402
commit 398527918e
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -655,6 +655,14 @@ if (NOT LIBSUPERDERPY_CONFIG_INCLUDED)
FILE "${CMAKE_BINARY_DIR}/vita/data" data
)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/data/vita/sce_sys/icon0.png")
add_custom_target(${LIBSUPERDERPY_GAMENAME}_vita_icon BYPRODUCTS ${CMAKE_BINARY_DIR}/vita/sce_sys/icon0.png
COMMAND convert ${CMAKE_SOURCE_DIR}/data/icons/128/${LIBSUPERDERPY_GAMENAME}.png -background white -flatten ${CMAKE_BINARY_DIR}/vita/icon.png
COMMAND pngquant 256 -f -o ${CMAKE_BINARY_DIR}/vita/sce_sys/icon0.png ${CMAKE_BINARY_DIR}/vita/icon.png
)
add_dependencies(${LIBSUPERDERPY_GAMENAME}.vpk ${LIBSUPERDERPY_GAMENAME}_vita_icon)
endif()
if(DEFINED ENV{VITA_IP})
add_custom_target(${LIBSUPERDERPY_GAMENAME}_deploy_vpk