summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAltoXorg <56553686+Alto1772@users.noreply.github.com>2025-08-10 01:25:46 +0800
committerGitHub <noreply@github.com>2025-08-09 11:25:46 -0600
commitdb01cf3d6fec1ef7f963e7e063251fd3e1e0a21b (patch)
tree18cd7414c8e7de88c1e85298e7fd653628d260e8 /CMakeLists.txt
parent334fdeafd26c15e03b4f198002ad86b8422c0e2f (diff)
Fix non-portable (#532)
* Fix for non-portable builds * submodule update Torch, [TEMP] libultraship * submodule update libultraship * place assets in exe's dir on post build
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b86e36ec2..66396af39 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,9 +93,6 @@ set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/config.yml" "${CMAKE_BINARY_DIR}/config.yml")
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/yamls/" "${CMAKE_BINARY_DIR}/yamls/")
-
if (MSVC)
set(CPP "${CMAKE_C_COMPILER}" "/EP")
else()
@@ -656,6 +653,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
endif()
endif()
+add_custom_command(
+ TARGET ${PROJECT_NAME} POST_BUILD
+ COMMENT "Copying asset yamls..."
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/config.yml" "$<TARGET_FILE_DIR:Spaghettify>/config.yml"
+ COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/yamls/" "$<TARGET_FILE_DIR:Spaghettify>/yamls/"
+)
+
if(NOT CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
include(ExternalProject)
ExternalProject_Add(TorchExternal