Add Vcpkg settings to map configs to what vcpkg expects (this prevents a message from being issue when vcpkg is installed) (#2063)

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-07-12 10:24:45 -07:00
committed by GitHub
parent a8435ec982
commit f83439e6c4
2 changed files with 12 additions and 1 deletions
@@ -9,6 +9,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
<PropertyGroup>
<UseMultiToolTask>true</UseMultiToolTask>
<EnforceProcessCountAcrossBuilds>true</EnforceProcessCountAcrossBuilds>
@VCPKG_CONFIGURATION_MAPPING@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
@@ -6,5 +6,15 @@
#
if(CMAKE_GENERATOR MATCHES "Visual Studio 16")
configure_file("${CMAKE_CURRENT_LIST_DIR}/Directory.Build.props" "${CMAKE_BINARY_DIR}/Directory.Build.props" COPYONLY)
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
if(conf STREQUAL debug)
string(APPEND VCPKG_CONFIGURATION_MAPPING " <VcpkgConfiguration Condition=\"'$(Configuration)' == '${conf}'\">Debug</VcpkgConfiguration>\n")
else()
string(APPEND VCPKG_CONFIGURATION_MAPPING " <VcpkgConfiguration Condition=\"'$(Configuration)' == '${conf}'\">Release</VcpkgConfiguration>\n")
endif()
endforeach()
configure_file("${CMAKE_CURRENT_LIST_DIR}/Directory.Build.props" "${CMAKE_BINARY_DIR}/Directory.Build.props" @ONLY)
endif()