mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 14:39:01 +08:00
8ccb84df72
* [scripts] update Boost ports generation script, fixes #35187 * [boost] remove obsolete patches and re-generate ports * update versions * [boost] remove redundant vcpkg_minimum_required * update versions * [scripts/boost] update dependencies to config/checks, review b2-options.cmake files * [boost-*] regenerate ports * [boost-locale] fix patch * update versions * [boost-serialization] fix checks * update version * [boost-*] better fixes related to the config checks * update version * [boost-cobalt] fix build * update versions * [liblas] Boost v1.84.0 requires C++11 * [pcl] fix Unix build * add versions * [vcpkg-cmake-get-vars] add CMAKE_<LANG>_COMPILER_VERSION * [boost-cobalt] detect compiler * [coin] force C++11 * [json5-parser] force C++11 * add versions * [boost-cobalt] exclude iOS and Android platforms due to C++ Concepts library is not supported * [gtsam] force C++11 * [kenlm] force C++11 * [quickfast] force C++11 * [liblas] force C++11 * update versions * [boost] re-generate port * update version * [kenlm] revert changes * [boost-cobalt] exclude OSX * update versions * [plc] remove useless patch after merge * update versions after merge --------- Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
77 lines
3.0 KiB
CMake
77 lines
3.0 KiB
CMake
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
|
|
|
if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW")
|
|
return()
|
|
endif()
|
|
|
|
set(BOOST_VERSION ${VERSION})
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO boostorg/build
|
|
REF boost-${VERSION}
|
|
SHA512 61540a3b2b7b6167ed8286daed4b4fde515ae9e0de81d17ef688d7972a0a6325b15afbe4e9a73ec883a81d5b86998d612cadbdc79abaf1b087a74e4e6b7cc2b5
|
|
HEAD_REF master
|
|
PATCHES
|
|
0002-fix-get-version.patch
|
|
0003-fix-emscripten.patch
|
|
0004-workaround-MSVC-codegen-bug-in-17.5-on-ARM64.patch
|
|
)
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/LICENSE_1_0.txt"
|
|
FILENAME "boost_LICENSE_1_0.txt"
|
|
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
|
|
)
|
|
|
|
vcpkg_download_distfile(BOOSTCPP_ARCHIVE
|
|
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/boostcpp.jam"
|
|
FILENAME "boost-${BOOST_VERSION}-boostcpp.jam"
|
|
SHA512 32feae4e13418f68702b18964b17e706255429dd881a098355a0b644da11a97c42aa7eeffa5cc4e30aa8a370dde2097aecc62175fb37cd5cf9766e7fc6303da7
|
|
)
|
|
|
|
# https://github.com/boostorg/boost/pull/206
|
|
# do not add version suffix for android
|
|
file(READ "${BOOSTCPP_ARCHIVE}" _contents)
|
|
string(REPLACE "aix &&" "aix android &&" _contents "${_contents}")
|
|
file(WRITE "${SOURCE_PATH}/boostcpp.jam" "${_contents}")
|
|
|
|
file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright)
|
|
|
|
# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation
|
|
string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}")
|
|
set(ENV{LIB} "${LIB}")
|
|
|
|
file(COPY
|
|
${SOURCE_PATH}/
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build
|
|
)
|
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" _contents)
|
|
string(REPLACE " /ZW /EHsc " "" _contents "${_contents}")
|
|
string(REPLACE "-nologo" "" _contents "${_contents}")
|
|
string(REPLACE "/nologo" "" _contents "${_contents}")
|
|
string(REPLACE "/Zm800" "" _contents "${_contents}")
|
|
string(REPLACE "<define>_WIN32_WINNT=0x0602" "" _contents "${_contents}")
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_contents}")
|
|
|
|
message(STATUS "Bootstrapping...")
|
|
if(CMAKE_HOST_WIN32)
|
|
if(VCPKG_TARGET_IS_MINGW)
|
|
set(TOOLSET mingw)
|
|
else()
|
|
set(TOOLSET msvc)
|
|
endif()
|
|
vcpkg_execute_required_process(
|
|
COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" ${TOOLSET}
|
|
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
|
|
LOGNAME bootstrap-${TARGET_TRIPLET}
|
|
)
|
|
else()
|
|
vcpkg_execute_required_process(
|
|
COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.sh"
|
|
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
|
|
LOGNAME bootstrap-${TARGET_TRIPLET}
|
|
)
|
|
endif()
|