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:
@@ -38,6 +38,9 @@ function(wx_add_demo name)
|
|||||||
target_link_libraries(${DEMO_NAME} core ${DEMO_LIBRARIES})
|
target_link_libraries(${DEMO_NAME} core ${DEMO_LIBRARIES})
|
||||||
wx_set_common_target_properties(${DEMO_NAME})
|
wx_set_common_target_properties(${DEMO_NAME})
|
||||||
set_target_properties(${DEMO_NAME} PROPERTIES FOLDER "Demos")
|
set_target_properties(${DEMO_NAME} PROPERTIES FOLDER "Demos")
|
||||||
|
set_target_properties(${DEMO_NAME} PROPERTIES
|
||||||
|
VS_DEBUGGER_WORKING_DIRECTORY "${wxOUTPUT_DIR}/${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}"
|
||||||
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
wx_add_demo(bombs
|
wx_add_demo(bombs
|
||||||
|
@@ -610,6 +610,9 @@ function(wx_add_sample name)
|
|||||||
set_target_properties(${target_name} PROPERTIES
|
set_target_properties(${target_name} PROPERTIES
|
||||||
FOLDER ${folder}
|
FOLDER ${folder}
|
||||||
)
|
)
|
||||||
|
set_target_properties(${target_name} PROPERTIES
|
||||||
|
VS_DEBUGGER_WORKING_DIRECTORY "${wxOUTPUT_DIR}/${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}"
|
||||||
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Link libraries to a sample
|
# Link libraries to a sample
|
||||||
@@ -704,6 +707,9 @@ function(wx_add_test name)
|
|||||||
endif()
|
endif()
|
||||||
wx_set_common_target_properties(${name})
|
wx_set_common_target_properties(${name})
|
||||||
set_target_properties(${name} PROPERTIES FOLDER "Tests")
|
set_target_properties(${name} PROPERTIES FOLDER "Tests")
|
||||||
|
set_target_properties(${name} PROPERTIES
|
||||||
|
VS_DEBUGGER_WORKING_DIRECTORY "${wxSOURCE_DIR}/tests"
|
||||||
|
)
|
||||||
|
|
||||||
add_test(NAME ${name}
|
add_test(NAME ${name}
|
||||||
COMMAND ${name}
|
COMMAND ${name}
|
||||||
|
Reference in New Issue
Block a user