aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-02-19 19:28:12 +0100
committerMateja <mail@matejamaric.com>2021-02-19 19:28:12 +0100
commitdf409aa76915b9e4c4ce784609429ba004ee2e38 (patch)
treea1c2fe9fc0f1f290d92ea64bfd93c8aa6ab829a1
parent9e7016e23471b7ba67598b5558c7fc7c528f1f2a (diff)
downloaderender-df409aa76915b9e4c4ce784609429ba004ee2e38.tar.gz
erender-df409aa76915b9e4c4ce784609429ba004ee2e38.zip
CMake: Copy model to build directory.
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f43cfa..39ff383 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,3 +36,10 @@ add_subdirectory(external/SFML)
target_include_directories(${PROJECT_NAME} PUBLIC external/SFML/include)
target_link_directories(${PROJECT_NAME} PUBLIC external/SFML/lib)
target_link_libraries(${PROJECT_NAME} sfml-graphics sfml-window sfml-system)
+
+# Copy model to build directory
+add_custom_command(
+ TARGET ${PROJECT_NAME} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${CMAKE_SOURCE_DIR}/model
+ ${CMAKE_CURRENT_BINARY_DIR}/model)