From 5b609056894895f1241a6d41df51a5830740ea2b Mon Sep 17 00:00:00 2001 From: binary1248 Date: Sun, 12 Nov 2023 17:57:18 +0100 Subject: [PATCH] Added missing VS_DEBUGGER_WORKING_DIRECTORY to sfml_add_test macro since tests now rely on loading file resources. --- cmake/Macros.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 7c2a0a93f..8ce8edbc8 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -350,6 +350,9 @@ function(sfml_add_test target SOURCES DEPENDS) # set the target flags to use the appropriate C++ standard library sfml_set_stdlib(${target}) + # set the Visual Studio startup path for debugging + set_target_properties(${target} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + # link the target to its SFML dependencies target_link_libraries(${target} PRIVATE ${DEPENDS} sfml-test-main)