mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 13:53:49 -07:00
Opt-in for an easy-way CMake target to create soh.otr file (#3057)
* use a convenient cmake target for gen soh otr * Update generate-builds.yml * Apply for all conditions * grandma change
This commit is contained in:
parent
74d6678543
commit
6923c2d3c0
4 changed files with 42 additions and 9 deletions
|
@ -132,6 +132,18 @@ add_custom_target(
|
|||
DEPENDS ZAPD
|
||||
)
|
||||
|
||||
# Target to generate only soh.otr
|
||||
add_custom_target(
|
||||
GenerateSohOtr
|
||||
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
|
||||
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f soh.otr
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --norom
|
||||
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLYSOHOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
||||
COMMENT "Generating soh.otr..."
|
||||
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