From df409aa76915b9e4c4ce784609429ba004ee2e38 Mon Sep 17 00:00:00 2001 From: Mateja Date: Fri, 19 Feb 2021 19:28:12 +0100 Subject: CMake: Copy model to build directory. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3