summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-06-13 13:35:29 -0600
committerGitHub <noreply@github.com>2024-06-13 13:35:29 -0600
commit0d629e466a75a3e7c8ab9ee8ea88bd4c52023a29 (patch)
tree1f832aad7b4f32558b19545f53092bb45b11fb93 /CMakeLists.txt
parentb594f112e05c46fa4f8da2e4be74ba1a28ee50b4 (diff)
Take7 (#17)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 10 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34c3f8e13..ed3840d4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,6 +61,7 @@ endif()
set(VERSION us)
set(USE_NETWORKING OFF)
set(SKIP_XCODE_VERSION_CHECK ON)
+set(GFX_DEBUG_DISASSEMBLER ON)
# Add compile definitions for the target
add_compile_definitions(
@@ -540,19 +541,23 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
endif()
include(ExternalProject)
-ExternalProject_Add(Torch
+ExternalProject_Add(torch
+ PREFIX torch
SOURCE_DIR ${CMAKE_SOURCE_DIR}/torch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/torch
)
-ExternalProject_Get_Property(Torch install_dir)
-set(TORCH_EXECUTABLE ${install_dir}/torch/build/x64/Debug/torch)
+ExternalProject_Get_Property(torch install_dir)
+set(TORCH_EXECUTABLE ${install_dir}/src/Torch-build/$<CONFIGURATION>/torch)
+message(STATUS "Torch executable path: ${TORCH_EXECUTABLE}")
add_custom_target(
ExtractAssets
- DEPENDS Torch
+ DEPENDS torch
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMAND ${TORCH_EXECUTABLE} header -o baserom.us.z64
+ COMMAND ${TORCH_EXECUTABLE} otr baserom.us.z64
COMMAND ${TORCH_EXECUTABLE} pack assets ship.otr
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/spaghetti.otr" "${CMAKE_BINARY_DIR}/spaghetti.otr"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/ship.otr" "${CMAKE_BINARY_DIR}/ship.otr"
-)
+ )