mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-27 08:10:31 +00:00
72a5644350
* O2R support * Still look for .otrs * Update submodule * Hotfix for exporter
30 lines
1.2 KiB
CMake
30 lines
1.2 KiB
CMake
message(STATUS "Copying otr files...")
|
|
|
|
if(NOT ONLY2SHIPOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/mm.zip)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy mm.zip ${SOURCE_DIR})
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy mm.zip ${BINARY_DIR}/mm/)
|
|
message(STATUS "Copied mm.zip")
|
|
endif()
|
|
if(EXISTS ${SOURCE_DIR}/OTRExporter/2ship.zip)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy 2ship.zip ${SOURCE_DIR})
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy 2ship.zip ${BINARY_DIR}/mm/)
|
|
message(STATUS "Copied 2ship.zip")
|
|
endif()
|
|
|
|
# Additionally for Windows, copy the otrs to the target dir, side by side with 2ship.exe
|
|
if(SYSTEM_NAME MATCHES "Windows")
|
|
if(NOT ONLY2SHIPOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/mm.zip)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy mm.zip ${TARGET_DIR})
|
|
endif()
|
|
if(EXISTS ${SOURCE_DIR}/OTRExporter/2ship.zip)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy 2ship.zip ${TARGET_DIR})
|
|
endif()
|
|
endif()
|
|
|
|
if(NOT ONLY2SHIPOTR AND (NOT EXISTS ${SOURCE_DIR}/mm.zip))
|
|
message(FATAL_ERROR "Failed to copy. No ZIP files found.")
|
|
endif()
|
|
if(NOT EXISTS ${SOURCE_DIR}/2ship.zip)
|
|
message(FATAL_ERROR "Failed to copy. No 2ship ZIP found.")
|
|
endif()
|