From fa9b788a06f69db4e7fc15ac5da7532500df7812 Mon Sep 17 00:00:00 2001 From: benpm Date: Wed, 1 Oct 2025 17:06:49 -0600 Subject: [PATCH] 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 --- CMakeLists.txt | 12 ++++++++++++ support/cmake/Directory.Build.Props.template | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 support/cmake/Directory.Build.Props.template diff --git a/CMakeLists.txt b/CMakeLists.txt index 650540967b..35386379d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/support/cmake/Directory.Build.Props.template b/support/cmake/Directory.Build.Props.template new file mode 100644 index 0000000000..8587ed915b --- /dev/null +++ b/support/cmake/Directory.Build.Props.template @@ -0,0 +1,5 @@ + + + false + + \ No newline at end of file