2023-04-14 09:56:38 -04:00
|
|
|
message(STATUS "Copying otr files...")
|
|
|
|
|
2023-08-15 20:26:23 -04:00
|
|
|
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/oot.otr)
|
2022-10-16 23:07:35 -04:00
|
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.otr ${SOURCE_DIR})
|
|
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.otr ${BINARY_DIR}/soh/)
|
2023-04-14 09:56:38 -04:00
|
|
|
message(STATUS "Copied oot.otr")
|
2022-10-16 23:07:35 -04:00
|
|
|
endif()
|
2023-08-15 20:26:23 -04:00
|
|
|
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/oot-mq.otr)
|
2022-10-16 23:07:35 -04:00
|
|
|
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/)
|
2023-04-14 09:56:38 -04:00
|
|
|
message(STATUS "Copied oot-mq.otr")
|
2022-10-16 23:07:35 -04:00
|
|
|
endif()
|
2023-04-12 21:14:33 -04:00
|
|
|
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/)
|
2023-04-14 09:56:38 -04:00
|
|
|
message(STATUS "Copied soh.otr")
|
2023-04-12 21:14:33 -04:00
|
|
|
endif()
|
2023-04-14 09:56:38 -04:00
|
|
|
|
|
|
|
# Additionally for Windows, copy the otrs to the target dir, side by side with soh.exe
|
|
|
|
if(SYSTEM_NAME MATCHES "Windows")
|
2023-08-15 20:26:23 -04:00
|
|
|
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/oot.otr)
|
2023-04-14 09:56:38 -04:00
|
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy oot.otr ${TARGET_DIR})
|
|
|
|
endif()
|
2023-08-15 20:26:23 -04:00
|
|
|
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/oot-mq.otr)
|
2023-04-14 09:56:38 -04:00
|
|
|
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()
|
|
|
|
|
2023-08-15 20:26:23 -04:00
|
|
|
if(NOT ONLYSOHOTR AND (NOT EXISTS ${SOURCE_DIR}/oot.otr AND NOT EXISTS ${SOURCE_DIR}/oot-mq.otr))
|
2023-04-14 09:56:38 -04:00
|
|
|
message(FATAL_ERROR "Failed to copy. No OTR files found.")
|
2023-04-13 18:37:10 -04:00
|
|
|
endif()
|
|
|
|
if(NOT EXISTS ${SOURCE_DIR}/soh.otr)
|
2023-04-14 09:56:38 -04:00
|
|
|
message(FATAL_ERROR "Failed to copy. No soh OTR found.")
|
|
|
|
endif()
|