Shipwright/copy-existing-otrs.cmake
louist103 040e0e1921
Tools update (#5454)
* Bump ZAPDTR & OTRExporter.
Changes to use o2r by default
Changes to the new player animation format

# Conflicts:
#	OTRExporter
#	ZAPDTR
#	soh/soh/OTRGlobals.cpp
#	soh/src/code/z_skelanime.c

* Fix actions

* Format

* Cherry pick ZAPDTR

* Update exporter

* Move configs to port

* Remove copy

* Remove more XML copies

* Remove extractor directory from actions builds.

* Fix OTRExporter for linux

* FIx ZAPD volatile

* Format

* Fix extractor?

* Fix linux

* Fix

* Remove appimage stuff

* Screnity now

* Remove ZAPD from install paths

* Remove soh.sh.in

* Fix linux

* Cleanups and use a thread for message box
2025-06-23 21:29:40 -04:00

37 lines
1.6 KiB
CMake

message(STATUS "Copying otr files...")
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/soh/oot.o2r)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.o2r ${SOURCE_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.o2r ${BINARY_DIR}/soh/)
message(STATUS "Copied oot.o2r")
endif()
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/soh/oot-mq.o2r)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot-mq.o2r ${SOURCE_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot-mq.o2r ${BINARY_DIR}/soh/)
message(STATUS "Copied oot-mq.o2r")
endif()
if(EXISTS ${SOURCE_DIR}/soh/soh.o2r)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy soh.o2r ${SOURCE_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy soh.o2r ${BINARY_DIR}/soh/)
message(STATUS "Copied soh.o2r")
endif()
# Additionally for Windows, copy the otrs to the target dir, side by side with soh.exe
if(SYSTEM_NAME MATCHES "Windows")
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/soh/oot.o2r)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.o2r ${TARGET_DIR})
endif()
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/soh/oot-mq.o2r)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot-mq.o2r ${TARGET_DIR})
endif()
if(EXISTS ${SOURCE_DIR}/soh/soh.o2r)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy soh.o2r ${TARGET_DIR})
endif()
endif()
if(NOT ONLYSOHOTR AND (NOT EXISTS ${SOURCE_DIR}/oot.o2r AND NOT EXISTS ${SOURCE_DIR}/oot-mq.o2r))
message(FATAL_ERROR "Failed to copy. No OTR files found.")
endif()
if(NOT EXISTS ${SOURCE_DIR}/soh.o2r)
message(FATAL_ERROR "Failed to copy. No soh OTR found.")
endif()