CMake: Set Visual Studio working directory

Use the executable output directory for samples and demos, use the source directory for tests.
This commit is contained in:
Maarten Bent
2018-01-10 22:56:42 +01:00
parent db86112675
commit 21615b1634
2 changed files with 9 additions and 0 deletions

View File

@@ -610,6 +610,9 @@ function(wx_add_sample name)
set_target_properties(${target_name} PROPERTIES
FOLDER ${folder}
)
set_target_properties(${target_name} PROPERTIES
VS_DEBUGGER_WORKING_DIRECTORY "${wxOUTPUT_DIR}/${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}"
)
endfunction()
# Link libraries to a sample
@@ -704,6 +707,9 @@ function(wx_add_test name)
endif()
wx_set_common_target_properties(${name})
set_target_properties(${name} PROPERTIES FOLDER "Tests")
set_target_properties(${name} PROPERTIES
VS_DEBUGGER_WORKING_DIRECTORY "${wxSOURCE_DIR}/tests"
)
add_test(NAME ${name}
COMMAND ${name}