2017-12-06 05:00:50 +08:00
|
|
|
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
|
|
|
|
2020-09-06 01:45:48 +08:00
|
|
|
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")
|
2018-03-12 14:01:33 +08:00
|
|
|
return()
|
2017-12-06 05:00:50 +08:00
|
|
|
endif()
|
|
|
|
|
2020-12-24 09:16:42 +08:00
|
|
|
set(BOOST_VERSION 1.75.0.beta1)
|
2019-05-17 09:33:32 +08:00
|
|
|
|
2017-12-06 05:00:50 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO boostorg/build
|
2019-05-17 09:33:32 +08:00
|
|
|
REF boost-${BOOST_VERSION}
|
2020-12-24 09:16:42 +08:00
|
|
|
SHA512 e5dd73ef41d341e2bce25677389502d22ca7f328e7fdbb91d95aac415f7b490008d75ff0a63f8e4bd9427215f863c161ec9573c29b663b727df4b60e25a3aac2
|
2017-12-06 05:00:50 +08:00
|
|
|
HEAD_REF master
|
2020-12-31 14:41:25 +08:00
|
|
|
PATCHES
|
|
|
|
fix_options.patch
|
2017-12-06 05:00:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2019-05-17 09:33:32 +08:00
|
|
|
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/LICENSE_1_0.txt"
|
2017-12-06 05:00:50 +08:00
|
|
|
FILENAME "boost_LICENSE_1_0.txt"
|
|
|
|
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(BOOSTCPP_ARCHIVE
|
2019-05-17 09:33:32 +08:00
|
|
|
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/boostcpp.jam"
|
|
|
|
FILENAME "boost-${BOOST_VERSION}-boostcpp.jam"
|
2020-05-14 01:26:05 +08:00
|
|
|
SHA512 8cf929fa4a602342c859a6bbd5f9dda783ac29431d951bcf6cae4cb14377c1b3aed90bacd902b0f7d1807591cf5e1a244cf8fc3c6cc6e0a4056db145b58f51df
|
2017-12-06 05:00:50 +08:00
|
|
|
)
|
|
|
|
|
2018-03-12 14:01:33 +08:00
|
|
|
file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright)
|
|
|
|
file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam)
|
|
|
|
|
|
|
|
# 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}")
|
|
|
|
|
2017-12-06 05:00:50 +08:00
|
|
|
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...")
|
2018-03-12 14:01:33 +08:00
|
|
|
if(CMAKE_HOST_WIN32)
|
2020-06-06 03:28:42 +08:00
|
|
|
if(VCPKG_TARGET_IS_MINGW)
|
|
|
|
set(TOOLSET mingw)
|
|
|
|
else()
|
|
|
|
set(TOOLSET msvc)
|
|
|
|
endif()
|
2018-03-12 14:01:33 +08:00
|
|
|
vcpkg_execute_required_process(
|
2020-06-06 03:28:42 +08:00
|
|
|
COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" ${TOOLSET}
|
2018-03-12 14:01:33 +08:00
|
|
|
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()
|