mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 18:48:04 -07:00
chore: move asset header generation to new ExtractAssetsHeaders target (#2705)
* add dedicated build target for extracting asset headers conditionally * dont gen otr when generating headers * simplify python array
This commit is contained in:
parent
660c3ec3b0
commit
1861335cf0
3 changed files with 31 additions and 5 deletions
|
@ -105,6 +105,7 @@ endif()
|
|||
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
|
||||
# Target to generate OTRs
|
||||
add_custom_target(
|
||||
ExtractAssets
|
||||
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
|
||||
|
@ -117,6 +118,15 @@ add_custom_target(
|
|||
BYPRODUCTS oot.otr ${CMAKE_SOURCE_DIR}/oot.otr oot-mq.otr ${CMAKE_SOURCE_DIR}/oot-mq.otr ${CMAKE_SOURCE_DIR}/soh.otr
|
||||
)
|
||||
|
||||
# Target to generate headers
|
||||
add_custom_target(
|
||||
ExtractAssetHeaders
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive --gen-headers
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
||||
COMMENT "Generating asset headers..."
|
||||
DEPENDS ZAPD
|
||||
)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
find_package(ImageMagick COMPONENTS convert)
|
||||
if (ImageMagick_FOUND)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue