mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-23 22:19:53 +00:00
982b52653a
* Support builtin extraction and CMake target extraction * bump submodules * add enum data
30 lines
1.2 KiB
CMake
30 lines
1.2 KiB
CMake
message(STATUS "Copying otr files...")
|
|
|
|
if(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/mm.otr)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy mm.otr ${SOURCE_DIR})
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy mm.otr ${BINARY_DIR}/mm/)
|
|
message(STATUS "Copied mm.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}/mm/)
|
|
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(NOT ONLYSOHOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/mm.otr)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy mm.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 ONLYSOHOTR AND (NOT EXISTS ${SOURCE_DIR}/mm.otr))
|
|
message(FATAL_ERROR "Failed to copy. No OTR files found.")
|
|
endif()
|
|
if(NOT EXISTS ${SOURCE_DIR}/soh.otr)
|
|
message(FATAL_ERROR "Failed to copy. No soh OTR found.")
|
|
endif()
|