mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
chore: copy otrs in windows into target dir (#2704)
* copy otrs in windows into target dir * improve status messaging for otr copy script
This commit is contained in:
parent
ead17892fe
commit
e72eeb95aa
2 changed files with 23 additions and 4 deletions
|
@ -1,18 +1,37 @@
|
|||
message(STATUS "Copying otr files...")
|
||||
|
||||
if(EXISTS ${SOURCE_DIR}/OTRExporter/oot.otr)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.otr ${SOURCE_DIR})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.otr ${BINARY_DIR}/soh/)
|
||||
message(STATUS "Copied oot.otr")
|
||||
endif()
|
||||
if(EXISTS ${SOURCE_DIR}/OTRExporter/oot-mq.otr)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot-mq.otr ${SOURCE_DIR})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot-mq.otr ${BINARY_DIR}/soh/)
|
||||
message(STATUS "Copied oot-mq.otr")
|
||||
endif()
|
||||
if(EXISTS ${SOURCE_DIR}/OTRExporter/soh.otr)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy soh.otr ${SOURCE_DIR})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy soh.otr ${BINARY_DIR}/soh/)
|
||||
message(STATUS "Copied soh.otr")
|
||||
endif()
|
||||
|
||||
# Additionally for Windows, copy the otrs to the target dir, side by side with soh.exe
|
||||
if(SYSTEM_NAME MATCHES "Windows")
|
||||
if(EXISTS ${SOURCE_DIR}/OTRExporter/oot.otr)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.otr ${TARGET_DIR})
|
||||
endif()
|
||||
if(EXISTS ${SOURCE_DIR}/OTRExporter/oot-mq.otr)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot-mq.otr ${TARGET_DIR})
|
||||
endif()
|
||||
if(EXISTS ${SOURCE_DIR}/OTRExporter/soh.otr)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy soh.otr ${TARGET_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS ${SOURCE_DIR}/oot.otr AND NOT EXISTS ${SOURCE_DIR}/oot-mq.otr)
|
||||
message(FATAL_ERROR, "No OTR files found.")
|
||||
message(FATAL_ERROR "Failed to copy. No OTR files found.")
|
||||
endif()
|
||||
if(NOT EXISTS ${SOURCE_DIR}/soh.otr)
|
||||
message(FATAL_ERROR, "No soh OTR found.")
|
||||
endif()
|
||||
message(FATAL_ERROR "Failed to copy. No soh OTR found.")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue