From 07508db546ebb3bc9b85d56d519866a0726fe3c3 Mon Sep 17 00:00:00 2001 From: dylanbenzi Date: Tue, 11 Nov 2025 23:02:34 -0500 Subject: [PATCH] modify cmake to add assets to out --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a36d56a..9fa88ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,3 +23,9 @@ FetchContent_MakeAvailable(SFML json) add_executable(main src/main.cpp src/Entity.cpp src/Game.cpp src/MazeMap.cpp src/ResourceManager.cpp) target_compile_features(main PRIVATE cxx_std_17) target_link_libraries(main PRIVATE SFML::Graphics SFML::Audio nlohmann_json::nlohmann_json) + +add_custom_command(TARGET main POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_SOURCE_DIR}/assets + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/assets + COMMENT "Copying assets to build directory") \ No newline at end of file