diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4db44b78..0597d6e4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,16 +15,15 @@ target_link_libraries( GTest::gtest_main ) -# HACK: copy res to test/ folder for fixing -# problem compatibility MultiConfig and non -# MultiConfig builds. Delete in future and -# use only root res folder +# HACK: copy res to test/ folder for fixing problem compatibility MultiConfig and non +# MultiConfig builds. Delete in future and use only root res folder +# Also this resolve problem with ctests, because it set cwd to CMAKE_CURRENT_BINARY_DIR add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/res - $/res + ${CMAKE_CURRENT_BINARY_DIR}/res ) include(GoogleTest)