Read in tile data from tilemap
This commit is contained in:
@ -6,16 +6,15 @@
|
||||
find_package(Python3 COMPONENTS Interpreter REQUIRED)
|
||||
|
||||
# Custom command to generate all header files
|
||||
add_custom_target(DUSK_CHUNKS
|
||||
# OUTPUT ${DUSK_GENERATED_HEADERS_DIR}/world/world.h
|
||||
add_custom_target(DUSK_TILES
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mapcompile.py
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tilecompile.py
|
||||
--output ${DUSK_GENERATED_HEADERS_DIR}
|
||||
--input ${DUSK_DATA_DIR}/map.tmj
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/mapcompile.py
|
||||
COMMENT "Generating chunk header files"
|
||||
--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_CHUNKS)
|
||||
add_dependencies(${DUSK_TARGET_NAME} DUSK_TILES)
|
Reference in New Issue
Block a user