Add prefix to ExternalProject to make everything go in the Torch directory (no more Torch-prefix).

Add `$<CONFIGURATION>` to TORCH_EXECUTABLE to get the right subdirectory for the build directory.
This commit is contained in:
Malkierian
2024-06-08 19:13:04 +01:00
committed by inspectredc
parent 0fc44bbec8
commit 78881d07ab
+2 -1
View File
@@ -490,11 +490,12 @@ endif()
include(ExternalProject)
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}/src/Torch-build/torch)
set(TORCH_EXECUTABLE ${install_dir}/src/Torch-build/$<CONFIGURATION>/torch)
add_custom_target(
ExtractAssets
DEPENDS Torch