added DISABLE_VCPKG CMake option, when enabled it disables vcpkg on Windows

this prevents some dependency conflicts from occurring, see linked issue for more info
fixes #3775
This commit is contained in:
benpm
2025-10-01 17:06:49 -06:00
parent 97e81208cb
commit fa9b788a06
2 changed files with 17 additions and 0 deletions

View File

@@ -38,6 +38,18 @@ set(OPENSPACE_VERSION_MAJOR)
set(OPENSPACE_VERSION_MINOR)
set(OPENSPACE_VERSION_PATCH)
# Optionally disable vcpkg to prevent dependency conflicts
set(DISABLE_VCPKG OFF CACHE BOOL "Disable the use of vcpkg libs for Windows builds")
if (WIN32 AND DISABLE_VCPKG)
# This works for all subprojects due to MSBuild's hierarchical search
configure_file(
"${CMAKE_SOURCE_DIR}/support/cmake/Directory.Build.Props.template"
"${CMAKE_BINARY_DIR}/Directory.Build.props"
COPYONLY
)
message(STATUS "Vcpkg disabled through CMake option DISABLE_VCPKG")
endif ()
include(${PROJECT_SOURCE_DIR}/support/cmake/module_common.cmake)
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake)

View File

@@ -0,0 +1,5 @@
<Project>
<PropertyGroup Label="Vcpkg">
<VcpkgEnabled>false</VcpkgEnabled>
</PropertyGroup>
</Project>