all repos — mgba @ 8b7660c679459801a8428ed708f98896ac882099

mGBA Game Boy Advance Emulator

Wii: Generate tpls at compile time
Vicki Pfau vi@endrift.com
Mon, 17 Aug 2020 15:43:34 -0700
commit

8b7660c679459801a8428ed708f98896ac882099

parent

9cd2aacd2b550b57e5f9280cd0e473ea1204d753

3 files changed, 14 insertions(+), 4 deletions(-)

jump to
M src/platform/wii/CMakeLists.txtsrc/platform/wii/CMakeLists.txt

@@ -23,14 +23,24 @@ add_executable(${BINARY_NAME}.elf ${GUI_SRC} main.c)

set_target_properties(${BINARY_NAME}.elf PROPERTIES COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}") target_link_libraries(${BINARY_NAME}.elf ${BINARY_NAME} ${OS_LIB}) +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/font.tpl + COMMAND ${GXTEXCONV} -i ${CMAKE_SOURCE_DIR}/res/font2x.png -o font.tpl colfmt=5 mipmap=no + MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/res/font2x.png + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/font.c - COMMAND ${RAW2C} ${CMAKE_SOURCE_DIR}/src/platform/wii/font.tpl - MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/src/platform/wii/font.tpl + COMMAND ${RAW2C} ${CMAKE_CURRENT_BINARY_DIR}/font.tpl + MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/font.tpl + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icons.tpl + COMMAND ${GXTEXCONV} -i ${CMAKE_SOURCE_DIR}/res/icons2x.png -o icons.tpl colfmt=5 mipmap=no + MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/res/icons2x.png WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icons.c - COMMAND ${RAW2C} ${CMAKE_SOURCE_DIR}/src/platform/wii/icons.tpl - MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/src/platform/wii/icons.tpl + COMMAND ${RAW2C} ${CMAKE_CURRENT_BINARY_DIR}/icons.tpl + MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/icons.tpl WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) add_custom_target(${BINARY_NAME}.dol ALL