Dawn/tools/vn/CMakeLists.txt
2021-11-05 10:55:10 -07:00

40 lines
950 B
CMake

# 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
)
target_include_directories(character_generator
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/../
)
target_link_libraries(character_generator
PUBLIC
stb
)
# Function Target
function(tool_vn_character target in out)
add_custom_target(vn_character_${target}
COMMAND character_generator "${in}" "${TEMP_DIR}/${out}"
COMMENT "Generating character ${target} from ${in}"
DEPENDS character_generator ${ARGN}
)
tool_texture(${target}
${TEMP_DIR}/${out}.png ${out}
vn_character_${target}
)
endfunction()