From 2e34440d2e5809665767d08544c532fa03a83925 Mon Sep 17 00:00:00 2001 From: CakeLancelot Date: Tue, 20 Apr 2021 17:17:24 -0500 Subject: [PATCH] Change the executable working directory for VS to repo root This fixes config.ini, and the tdata directory not being picked up, so now it launches without closing instantly --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97703b8..cef0d74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,9 @@ set_target_properties(openfusion PROPERTIES OUTPUT_NAME ${BIN_NAME}) target_link_libraries(openfusion sqlite3) +# Makes it so config, tdata, etc. get picked up when starting via the debugger in VS +set_property(TARGET openfusion PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") + # Use pthreads if not generating a VS solution or MinGW makefile (because MinGW will prefer Win32 threads) # Checking if the compiler ID is MSVC will allow us to open the project as a CMake project in VS. # It's not something you should do, but it's there if you need it...