Added missing VS_DEBUGGER_WORKING_DIRECTORY to sfml_add_test macro since tests now rely on loading file resources.

This commit is contained in:
binary1248 2023-11-12 17:57:18 +01:00
parent 116c101a77
commit 5b60905689

View File

@ -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)