aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTsukasa Sugiura <t.sugiura0204@gmail.com>2017-12-20 09:18:13 +0900
committerRobert Schumacher <roschuma@microsoft.com>2017-12-19 16:18:13 -0800
commit6cb6a61aaf5ef2c143f974e9f731778bcd3f5cbe (patch)
treea7955cdd6acb7e8916301d8bf139c0a612923a06 /scripts
parent7e1a737ba4ef1fb0377b75c4a64973f821a561d0 (diff)
downloadvcpkg-6cb6a61aaf5ef2c143f974e9f731778bcd3f5cbe.tar.gz
vcpkg-6cb6a61aaf5ef2c143f974e9f731778bcd3f5cbe.zip
Fix find Boost when can not be found Boost that installed with Vcpkg (#2395)
* Fix find Boost when can not be found Boost that installed with Vcpkg Fix find Boost when can not be found Boost that installed with Vcpkg. Re-find package Boost uisng user specified options. * Fix regex of generators Fix regex of generators. Add ending position. * Fix Save and Resore Boost_COMPILER * [vcpkg-cmake-integration] Expand saved boost variables
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/vcpkg.cmake15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 71cf4e9b3..b8d3fbdbb 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -31,9 +31,9 @@ else()
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$")
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
- elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM")
+ elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM$")
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
- elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017")
+ elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017$")
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
else()
find_program(_VCPKG_CL cl)
@@ -165,11 +165,22 @@ endfunction()
macro(find_package name)
if("${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})
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)