From 5eba9b3092943c60ff0433424d3ec2e23f85e544 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 8 Jul 2021 18:09:24 +0200 Subject: [PATCH] cmake+msvc: set debugger working directory to directory of binary --- cmake/win/WinFunctions.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/win/WinFunctions.cmake b/cmake/win/WinFunctions.cmake index d693af3..c56cfa7 100644 --- a/cmake/win/WinFunctions.cmake +++ b/cmake/win/WinFunctions.cmake @@ -17,4 +17,8 @@ function(librw_platform_target TARGET) target_link_options(${TARGET} INTERFACE -Wl,--undefined,WinMain) endif() endif() + + set_target_properties(${TARGET} PROPERTIES + VS_DEBUGGER_WORKING_DIRECTORY "$" + ) endfunction()