20 lines
637 B
CMake
20 lines
637 B
CMake
# Copyright (c) 2025 Dominic Masters
|
|
#
|
|
# This software is released under the MIT License.
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
find_package(Python3 COMPONENTS Interpreter REQUIRED)
|
|
|
|
# Custom command to generate all header files
|
|
add_custom_target(DUSK_TILES
|
|
COMMAND
|
|
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tilecompile.py
|
|
--output ${DUSK_GENERATED_HEADERS_DIR}
|
|
--input ${DUSK_DATA_DIR}/overworld.tsx
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tilecompile.py
|
|
COMMENT "Generating tile header file"
|
|
VERBATIM
|
|
)
|
|
|
|
# Ensure headers are generated before compiling main
|
|
add_dependencies(${DUSK_TARGET_NAME} DUSK_TILES) |