From f83439e6c4d2fdd16b0433488855bab540154a95 Mon Sep 17 00:00:00 2001
From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
Date: Mon, 12 Jul 2021 10:24:45 -0700
Subject: [PATCH] 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>
---
cmake/Platform/Common/Directory.Build.props | 1 +
cmake/Platform/Common/VisualStudio_common.cmake | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/cmake/Platform/Common/Directory.Build.props b/cmake/Platform/Common/Directory.Build.props
index 29dbcd8584..9389a008ad 100644
--- a/cmake/Platform/Common/Directory.Build.props
+++ b/cmake/Platform/Common/Directory.Build.props
@@ -9,6 +9,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
true
true
+@VCPKG_CONFIGURATION_MAPPING@
diff --git a/cmake/Platform/Common/VisualStudio_common.cmake b/cmake/Platform/Common/VisualStudio_common.cmake
index 345214274b..91817bef6f 100644
--- a/cmake/Platform/Common/VisualStudio_common.cmake
+++ b/cmake/Platform/Common/VisualStudio_common.cmake
@@ -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 " Debug\n")
+ else()
+ string(APPEND VCPKG_CONFIGURATION_MAPPING " Release\n")
+ endif()
+ endforeach()
+
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/Directory.Build.props" "${CMAKE_BINARY_DIR}/Directory.Build.props" @ONLY)
+
endif()
\ No newline at end of file