From 3b5bcfc82d896b371f2fcae61b56f788252b8d1f Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Wed, 24 Dec 2025 12:02:51 +0000 Subject: [PATCH] Guard asset copies with existence checks --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cef9fbf..be587f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,8 +118,13 @@ if(BUILD_SDL3_APP) target_link_libraries(sdl3_app PRIVATE ${SDL_TARGET} Vulkan::Vulkan lua::lua CLI11::CLI11 rapidjson assimp::assimp Bullet::Bullet glm::glm Vorbis::vorbisfile Vorbis::vorbis) target_compile_definitions(sdl3_app PRIVATE SDL_MAIN_HANDLED) - file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/shaders" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") - file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/scripts" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/shaders") + file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/shaders" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + endif() + + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/scripts") + file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/scripts" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + endif() endif() enable_testing()