aboutsummaryrefslogtreecommitdiff
path: root/scripts/buildsystems/vcpkg.cmake
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-06-03 19:31:28 -0700
committerGitHub <noreply@github.com>2020-06-03 19:31:28 -0700
commit4fb225608532e9fb2fd2f5f1dbe9ec092cdc7c93 (patch)
treed4ccfc78c9043c6c136dc2ec72a3f005366564a3 /scripts/buildsystems/vcpkg.cmake
parent20e6626d8758f5e46c1777e3e1ff4d98ed5d2e7a (diff)
downloadvcpkg-4fb225608532e9fb2fd2f5f1dbe9ec092cdc7c93.tar.gz
vcpkg-4fb225608532e9fb2fd2f5f1dbe9ec092cdc7c93.zip
[vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links (#11483)
Diffstat (limited to 'scripts/buildsystems/vcpkg.cmake')
-rw-r--r--scripts/buildsystems/vcpkg.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 66f9ec921..03926336b 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -1,7 +1,7 @@
# Mark variables as used so cmake doesn't complain about them
mark_as_advanced(CMAKE_TOOLCHAIN_FILE)
-# VCPKG toolchain options.
+# VCPKG toolchain options.
option(VCPKG_VERBOSE "Enables messages from the VCPKG toolchain for debugging purposes." OFF)
mark_as_advanced(VCPKG_VERBOSE)
@@ -28,7 +28,7 @@ endif()
#If CMake does not have a mapping for MinSizeRel and RelWithDebInfo in imported targets
#it will map those configuration to the first valid configuration in CMAKE_CONFIGURATION_TYPES or the targets IMPORTED_CONFIGURATIONS.
-#In most cases this is the debug configuration which is wrong.
+#In most cases this is the debug configuration which is wrong.
if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL)
set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;")
if(VCPKG_VERBOSE)
@@ -151,7 +151,9 @@ if(NOT DEFINED _VCPKG_ROOT_DIR)
endwhile()
set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE} CACHE INTERNAL "Vcpkg root directory")
endif()
-set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed)
+if (NOT DEFINED _VCPKG_INSTALLED_DIR)
+ set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed)
+endif()
if(NOT EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" AND NOT _CMAKE_IN_TRY_COMPILE AND NOT VCPKG_SUPPRESS_INSTALLED_LIBRARIES_WARNING)
message(WARNING "There are no libraries installed for the Vcpkg triplet ${VCPKG_TARGET_TRIPLET}.")