Merge pull request #5905 from Spire42/303483-CMake-creates-VS-projects-with-incorrect-settings
Fix #303483: CMake creates Microsoft Visual Studio projects with incorrect settings
This commit is contained in:
commit
a1bb651ea3
2 changed files with 22 additions and 6 deletions
|
@ -916,16 +916,32 @@ add_custom_target(lrelease
|
|||
|
||||
add_dependencies(mscore pluginDocumentation)
|
||||
|
||||
|
||||
##
|
||||
## For MSVC: set the startup project to be mscore
|
||||
## (requires CMake 3.6.3+ to work, but should be benign on other versions
|
||||
## as it is just setting the value for a property).
|
||||
## Miscellaneous Microsoft Visual Studio settings
|
||||
##
|
||||
if (MSVC)
|
||||
|
||||
# Force the "install" and "package" targets not to depend on the "all" target.
|
||||
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true)
|
||||
set(CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY true)
|
||||
set(VS_STARTUP_PROJECT mscore)
|
||||
|
||||
# Set the startup project to "mscore".
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS "3.6.0")
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT mscore)
|
||||
endif ()
|
||||
|
||||
# Set the debugging properties for the "mscore" project.
|
||||
file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}/bin" VS_DEBUGGER_WORKING_DIRECTORY)
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
||||
set_target_properties(mscore PROPERTIES VS_DEBUGGER_COMMAND "${VS_DEBUGGER_WORKING_DIRECTORY}\\${MSCORE_EXECUTABLE_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
endif ()
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS "3.8.0")
|
||||
set_target_properties(mscore PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${VS_DEBUGGER_WORKING_DIRECTORY}")
|
||||
endif ()
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS "3.13.0")
|
||||
set_target_properties(mscore PROPERTIES VS_DEBUGGER_COMMAND_ARGUMENTS "--debug")
|
||||
endif ()
|
||||
|
||||
endif (MSVC)
|
||||
|
||||
## TEMP: Display all variables!
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"value": "${projectDir}\\dependencies\\libx64"
|
||||
}
|
||||
],
|
||||
"buildCommandArgs": "-v",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": ""
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue