aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/corrade/portfile.cmake14
1 files changed, 12 insertions, 2 deletions
diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake
index 336cda6e3..40011f3d0 100644
--- a/ports/corrade/portfile.cmake
+++ b/ports/corrade/portfile.cmake
@@ -26,13 +26,23 @@ foreach(_feature IN LISTS ALL_FEATURES)
endif()
endforeach()
+if(NOT VCPKG_CMAKE_SYSTEM_NAME)
+ # building for Windows desktop
+ if (VCPKG_PLATFORM_TOOLSET STREQUAL "v142" AND NOT VCPKG_USE_HEAD_VERSION)
+ message("**********")
+ message("WARNING: Visual Studio 2019 is not official supported by Corrade/Magnum team. Please use --head version if you intend to have upstream support.")
+ message("**********")
+ set(_CUSTOM_BUILD_FLAGS "-DCORRADE_MSVC2017_COMPATIBILITY=ON")
+ endif()
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
OPTIONS
- -DDUTILITY_USE_ANSI_COLORS=ON
+ -DUTILITY_USE_ANSI_COLORS=ON
-DBUILD_STATIC=${BUILD_STATIC}
- -DCORRADE_MSVC2017_COMPATIBILITY=ON
+ ${_CUSTOM_BUILD_FLAGS}
${_COMPONENT_FLAGS}
)