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.
This commit is contained in:
tarcila 2019-08-06 13:34:39 -04:00 committed by Curtis J Bezault
parent 7686945aeb
commit 450f09c7a8

View File

@ -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}
)