From c858ef3b1d26e31f57adf640c787cd70d4ff3a6d Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 27 Sep 2022 13:10:33 +0200 Subject: [PATCH] CMake: Always copy assets to build directory, fixes example: $ make run --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03d24ab..b803e60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,9 +69,10 @@ add_subdirectory("src") # ------------------------------------------ # Assets target -add_custom_target(${ENGINE}-assets ALL +add_custom_target(${ENGINE}-assets COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/copy-assets.cmake WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_dependencies(${ENGINE} ${ENGINE}-assets) # ------------------------------------------ # Examples target