From 4338ae25a1ac1f81499d12f0c5e4acef5fa1e426 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 11 Mar 2018 23:04:09 -0700 Subject: [vcpkg] Enable packages to provide cmake wrapper scripts. --- scripts/buildsystems/vcpkg.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/buildsystems') diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index e621da861..1d1977e6a 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -184,7 +184,11 @@ function(add_library name) endfunction() macro(find_package name) - if("${name}" STREQUAL "Boost") + string(TOLOWER "${name}" _vcpkg_lowercase_name) + if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake") + set(ARGS "${ARGV}") + include(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake) + elseif("${name}" STREQUAL "Boost") set(_Boost_USE_STATIC_LIBS ${Boost_USE_STATIC_LIBS}) set(_Boost_USE_MULTITHREADED ${Boost_USE_MULTITHREADED}) set(_Boost_USE_STATIC_RUNTIME ${Boost_USE_STATIC_RUNTIME}) -- cgit v1.2.3