diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2024-09-06 23:25:52 -0600 |
|---|---|---|
| committer | Sonic Dreamcaster <alejandro.asenjo88@gmail.com> | 2024-09-17 20:30:14 -0300 |
| commit | b03d093fc23f6b6ef5ebd38b04e10b813c9a2e1a (patch) | |
| tree | 0720b2e0c2109d71459cd1b0f4fbf34cd7b18232 /CMakeLists.txt | |
| parent | 299aa719668d40044f6d101cafdd0bdb5bf05e83 (diff) | |
Fixed compilation with latest lus
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c659a485..80e9b08e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -537,3 +537,22 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") ) endif() endif() + +include(ExternalProject) +ExternalProject_Add(Torch + PREFIX Torch + SOURCE_DIR ${CMAKE_SOURCE_DIR}/tools/Torch + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/Torch +) +ExternalProject_Get_Property(Torch install_dir) +set(TORCH_EXECUTABLE ${install_dir}/src/Torch-build/$<CONFIGURATION>/torch) +add_custom_target( + ExtractAssets + DEPENDS Torch + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND ${TORCH_EXECUTABLE} header -o baserom.us.uncompressed.z64 + COMMAND ${TORCH_EXECUTABLE} otr baserom.us.uncompressed.z64 + # COMMAND ${TORCH_EXECUTABLE} pack assets starship.otr + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/sf64.otr" "${CMAKE_BINARY_DIR}/sf64.otr" + # COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/starship.otr" "${CMAKE_BINARY_DIR}/starship.otr" +)
\ No newline at end of file |
