Skip to content

Commit

Permalink
Corrade: Drop vs2017 workaround when building HEAD for vs2019 (micros…
Browse files Browse the repository at this point in the history
…oft#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.
  • Loading branch information
tarcila authored and frabert committed Aug 7, 2019
1 parent 23db9b4 commit 74a5a52
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ports/corrade/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)

Expand Down

0 comments on commit 74a5a52

Please sign in to comment.