From 2cd479755732fc048322f9759aa4af0c7ea76e7a Mon Sep 17 00:00:00 2001 From: Mario Liebisch Date: Mon, 5 Feb 2018 21:56:32 +0100 Subject: [PATCH] Examples: Set startup folder for debugging in Visual Studio --- cmake/Macros.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 02dc145e..be523459 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -217,6 +217,9 @@ macro(sfml_add_example target) # 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 if(THIS_DEPENDS) target_link_libraries(${target} PRIVATE ${THIS_DEPENDS})