mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[boost-modular-headers] download the license file only once (#22462)
* [boost-modular-headers] download license file only once for every header-only library * update version
This commit is contained in:
parent
e16a8ac6dc
commit
9e0e9762e6
@ -1,26 +1,20 @@
|
||||
function(boost_modular_headers)
|
||||
cmake_parse_arguments(_bm "" "SOURCE_PATH" "" ${ARGN})
|
||||
|
||||
set(BOOST_VERSION 1.78.0)
|
||||
|
||||
if(NOT DEFINED _bm_SOURCE_PATH)
|
||||
message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_headers.")
|
||||
endif()
|
||||
|
||||
message(STATUS "Packaging headers")
|
||||
|
||||
message(STATUS "Copying headers")
|
||||
file(
|
||||
COPY ${_bm_SOURCE_PATH}/include/boost
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
)
|
||||
message(STATUS "Copying headers done")
|
||||
|
||||
message(STATUS "Packaging headers done")
|
||||
|
||||
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
|
||||
file(INSTALL
|
||||
${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/usage
|
||||
${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/copyright
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
||||
)
|
||||
file(INSTALL ${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
endfunction()
|
||||
|
@ -1,8 +1,17 @@
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
file(COPY
|
||||
set(BOOST_VERSION 1.78.0)
|
||||
|
||||
file(INSTALL
|
||||
${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake
|
||||
${CMAKE_CURRENT_LIST_DIR}/usage
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
||||
)
|
||||
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
vcpkg_download_distfile(LICENSE
|
||||
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/LICENSE_1_0.txt"
|
||||
FILENAME "boost_LICENSE_1_0.txt"
|
||||
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
|
||||
)
|
||||
|
||||
file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "boost-vcpkg-helpers",
|
||||
"version": "1.78.0",
|
||||
"port-version": 1,
|
||||
"description": "Internal vcpkg port used to modularize Boost",
|
||||
"dependencies": [
|
||||
"boost-uninstall"
|
||||
|
@ -24,6 +24,7 @@ else {
|
||||
# Clear this array when moving to a new boost version
|
||||
$portVersions = @{
|
||||
#e.g. "boost-asio" = 1;
|
||||
"boost-vcpkg-helpers" = 1;
|
||||
}
|
||||
|
||||
$portData = @{
|
||||
@ -598,7 +599,7 @@ if ($updateServicePorts) {
|
||||
$files_with_boost_version = @(
|
||||
"$portsDir/boost-build/portfile.cmake",
|
||||
"$portsDir/boost-modular-build-helper/boost-modular-build.cmake",
|
||||
"$portsDir/boost-vcpkg-helpers/boost-modular-headers.cmake"
|
||||
"$portsDir/boost-vcpkg-helpers/portfile.cmake"
|
||||
)
|
||||
$files_with_boost_version | % {
|
||||
$content = Get-Content -LiteralPath $_ `
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2b601d13ad505473bac3d555d9e543d981c46565",
|
||||
"version": "1.78.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "b8003935ceb891a870f1bbef0ffd18ef4266c6f7",
|
||||
"version": "1.78.0",
|
||||
|
@ -1102,7 +1102,7 @@
|
||||
},
|
||||
"boost-vcpkg-helpers": {
|
||||
"baseline": "1.78.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"boost-vmd": {
|
||||
"baseline": "1.78.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user