If CMake supports it, sets the debugger working directory for Visual Studio

experimental
AnyOldName3 7 years ago
parent 8f1c8759e4
commit 3c0ec0d6d0

@ -18,3 +18,9 @@ if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
target_link_libraries(bsatool gcov)
endif()
if (MSVC)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(bsatool PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)

@ -21,3 +21,9 @@ if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
target_link_libraries(esmtool gcov)
endif()
if (MSVC)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(esmtool PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)

@ -46,3 +46,9 @@ endif()
if (WIN32)
INSTALL(TARGETS openmw-essimporter RUNTIME DESTINATION ".")
endif(WIN32)
if (MSVC)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(openmw-essimporter PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)

@ -110,4 +110,8 @@ if (BUILD_WITH_CODE_COVERAGE)
target_link_libraries(openmw-launcher gcov)
endif()
if (MSVC)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(openmw-launcher PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)

@ -33,3 +33,9 @@ if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
target_link_libraries(openmw-iniimporter gcov)
endif()
if (MSVC)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(openmw-iniimporter PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)

@ -17,3 +17,9 @@ if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
target_link_libraries(niftest gcov)
endif()
if (MSVC)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(niftest PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)

@ -260,6 +260,10 @@ if (MSVC)
if (CMAKE_CL_64)
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj")
endif (CMAKE_CL_64)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(openmw-cs PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)

@ -215,6 +215,10 @@ if (MSVC)
if (CMAKE_CL_64)
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj")
endif (CMAKE_CL_64)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(openmw PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)
if (WIN32)

@ -24,6 +24,12 @@ if (GTEST_FOUND)
if (UNIX AND NOT APPLE)
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})
endif()
if (MSVC)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(openmw_test_suite PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)
endif()

@ -143,3 +143,9 @@ endif()
if (WIN32)
INSTALL(TARGETS openmw-wizard RUNTIME DESTINATION ".")
endif(WIN32)
if (MSVC)
if (CMAKE_VERSION VERSION_GREATER 3.8)
set_target_properties(openmw-wizard PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
endif (CMAKE_VERSION VERSION_GREATER 3.8)
endif (MSVC)
Loading…
Cancel
Save