# Copyright (c) 2021 Dominic Msters # # This software is released under the MIT License. # https://opensource.org/licenses/MIT cmake_minimum_required(VERSION 3.13) set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) # Build Tool project(character_generator VERSION 1.0) add_executable(character_generator) target_sources(character_generator PRIVATE character_generator.c ../utils/file.c ../utils/xml.c ../utils/image.c ) target_include_directories(character_generator PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../ ) target_link_libraries(character_generator PUBLIC stb ) target_link_libraries(character_generator PRIVATE ${LIBS_PLATFORM} ) # Function Target function(tool_vn_character target in out) add_custom_target(vn_character_${target} COMMAND character_generator "${in}" "${TEMP_DIR}/${out}.png" COMMENT "Generating character ${target} from ${in}" DEPENDS character_generator ${ARGN} ) tool_texture(${target} ${TEMP_DIR}/${out}.png ${out} vn_character_${target} ) endfunction()