From 450f09c7a8f955ed722acd3791d9080a039da2a0 Mon Sep 17 00:00:00 2001 From: tarcila Date: Tue, 6 Aug 2019 13:34:39 -0400 Subject: [PATCH] Corrade: Drop vs2017 workaround when building HEAD for vs2019 (#7566) * Corrade: Make sure to drop vs2017 workaround when building HEAD for vs2019 Otherwise building HEAD is broken. Also add a warning about current Corrade release not supporting vs2019, suggesting to use HEAD instead. * [corrade] this option name is wrong. --- ports/corrade/portfile.cmake | 14 ++++++++++++-- 1 file 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} )