aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-03-14 05:08:35 -0700
committerRobert Schumacher <roschuma@microsoft.com>2018-03-14 09:58:23 -0700
commitc5f93055a09629247236d1d7dca2c4aa9c1de7c9 (patch)
tree3d83f3c2dbf7fc536124a3bbb5367125a5acfdb4 /scripts
parent90c4b8dbb7a69584a4a36c67e4982cf086b7c578 (diff)
downloadvcpkg-c5f93055a09629247236d1d7dca2c4aa9c1de7c9.tar.gz
vcpkg-c5f93055a09629247236d1d7dca2c4aa9c1de7c9.zip
[vcpkg-cmake-toolchain] Only wrap find_package(Boost) if a boost library is installed.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/vcpkg.cmake14
1 files changed, 2 insertions, 12 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 196ddcb3c..10e3c3f13 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -190,23 +190,13 @@ macro(find_package 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})
- set(_Boost_COMPILER ${Boost_COMPILER})
+ elseif("${name}" STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost")
+ # Checking for the boost headers disables this wrapper unless the user has installed at least one boost library
unset(Boost_USE_STATIC_LIBS)
unset(Boost_USE_MULTITHREADED)
unset(Boost_USE_STATIC_RUNTIME)
set(Boost_COMPILER "-vc140")
_find_package(${ARGV})
- if(NOT Boost_FOUND)
- 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})
- set(Boost_COMPILER ${_Boost_COMPILER})
- _find_package(${ARGV})
- endif()
elseif("${name}" STREQUAL "ICU")
function(_vcpkg_find_in_list)
list(FIND ARGV "COMPONENTS" COMPONENTS_IDX)