mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[boost-locale] Replace VCPKG_TARGET_IS_WINDOWS in b2-options (#14502)
* [boost-locale] Use CMAKE_SYSTEM_NAME as a fallback where VCPKG_TARGET_IS_WINDOWS is not available * fix this issue in a different way * Remove comments in b2-options.cmake.in Co-authored-by: nicole mazzuca <mazzucan@outlook.com> * fix generate-ports.ps1 Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
This commit is contained in:
parent
8d2332660c
commit
e2ff466f65
@ -1,6 +1,7 @@
|
||||
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
|
||||
# Automatically generated by scripts/boost/generate-ports.ps1
|
||||
Source: boost-locale
|
||||
Version: 1.74.0
|
||||
Port-Version: 1
|
||||
Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-vcpkg-helpers, libiconv (!uwp&!windows)
|
||||
Homepage: https://github.com/boostorg/locale
|
||||
Description: Boost locale module
|
||||
|
@ -1,15 +1,16 @@
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
if("icu" IN_LIST FEATURES)
|
||||
set(BOOST_LOCALE_ICU on)
|
||||
else()
|
||||
set(BOOST_LOCALE_ICU off)
|
||||
endif()
|
||||
set(_B2_OPTIONS_FEATURES "@FEATURES@")
|
||||
if("icu" IN_LIST _B2_OPTIONS_FEATURES)
|
||||
set(BOOST_LOCALE_ICU_FEATURE on)
|
||||
else()
|
||||
set(BOOST_LOCALE_ICU_FEATURE off)
|
||||
endif()
|
||||
|
||||
if(@VCPKG_TARGET_IS_WINDOWS@)
|
||||
list(APPEND B2_OPTIONS
|
||||
boost.locale.iconv=off
|
||||
boost.locale.posix=off
|
||||
/boost/locale//boost_locale
|
||||
boost.locale.icu=${BOOST_LOCALE_ICU}
|
||||
boost.locale.icu=${BOOST_LOCALE_ICU_FEATURE}
|
||||
)
|
||||
else()
|
||||
find_library(LIBICONV_LIBRARY iconv)
|
||||
@ -19,7 +20,7 @@ else()
|
||||
boost.locale.iconv=on
|
||||
boost.locale.posix=on
|
||||
/boost/locale//boost_locale
|
||||
boost.locale.icu=off
|
||||
boost.locale.icu=${BOOST_LOCALE_ICU_FEATURE}
|
||||
-sICONV_PATH=${LIBICONV_DIR}
|
||||
)
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
|
@ -1,4 +1,4 @@
|
||||
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
|
||||
# Automatically generated by scripts/boost/generate-ports.ps1
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
@ -12,9 +12,14 @@ vcpkg_from_github(
|
||||
)
|
||||
|
||||
include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake.in"
|
||||
"${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake"
|
||||
@ONLY
|
||||
)
|
||||
boost_modular_build(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake"
|
||||
BOOST_CMAKE_FRAGMENT "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake"
|
||||
)
|
||||
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
|
||||
boost_modular_headers(SOURCE_PATH ${SOURCE_PATH})
|
||||
|
@ -5,15 +5,27 @@ param (
|
||||
$portsDir = $null
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
if ($null -eq $portsDir)
|
||||
{
|
||||
$portsDir = "$scriptsDir/../../ports"
|
||||
}
|
||||
|
||||
if ($IsWindows)
|
||||
{
|
||||
$vcpkg = "$scriptsDir/../../vcpkg.exe"
|
||||
}
|
||||
else
|
||||
{
|
||||
$vcpkg = "$scriptsDir/../../vcpkg"
|
||||
}
|
||||
|
||||
# Optionally clear this array when moving to a new boost version
|
||||
$port_versions = @{
|
||||
#e.g. "asio" = 1;
|
||||
"locale" = 1;
|
||||
}
|
||||
|
||||
$per_port_data = @{
|
||||
@ -82,7 +94,7 @@ function Generate()
|
||||
|
||||
mkdir "$portsDir/boost-$PortName" -erroraction SilentlyContinue | out-null
|
||||
$controlLines = @(
|
||||
"# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1"
|
||||
"# Automatically generated by scripts/boost/generate-ports.ps1"
|
||||
"Source: boost-$PortName"
|
||||
"Version: $version"
|
||||
)
|
||||
@ -106,7 +118,7 @@ function Generate()
|
||||
$controlLines | out-file -enc ascii "$portsDir/boost-$PortName/CONTROL"
|
||||
|
||||
$portfileLines = @(
|
||||
"# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1"
|
||||
"# Automatically generated by scripts/boost/generate-ports.ps1"
|
||||
""
|
||||
)
|
||||
|
||||
@ -167,6 +179,20 @@ function Generate()
|
||||
")"
|
||||
)
|
||||
}
|
||||
elseif (Test-Path "$portsDir/boost-$PortName/b2-options.cmake.in")
|
||||
{
|
||||
$portfileLines += @(
|
||||
'configure_file('
|
||||
' "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake.in"'
|
||||
' "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake"'
|
||||
' @ONLY'
|
||||
')'
|
||||
'boost_modular_build('
|
||||
' SOURCE_PATH ${SOURCE_PATH}'
|
||||
' BOOST_CMAKE_FRAGMENT "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake"'
|
||||
')'
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
$portfileLines += @(
|
||||
@ -249,9 +275,9 @@ foreach ($library in $libraries)
|
||||
if (!(Test-Path $archive))
|
||||
{
|
||||
"Downloading boost/$library..."
|
||||
& @(vcpkg fetch aria2)[-1] "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz"
|
||||
& @(& $vcpkg fetch aria2)[-1] "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz"
|
||||
}
|
||||
$hash = vcpkg hash $archive
|
||||
$hash = & $vcpkg hash $archive
|
||||
$unpacked = "$scriptsDir/libs/$library-boost-$version"
|
||||
if (!(Test-Path $unpacked))
|
||||
{
|
||||
@ -408,7 +434,7 @@ if ($libraries_in_boost_port.length -gt 1) {
|
||||
$boostDependsList = @($libraries_in_boost_port | % { "boost-$_" } | ? { $_ -notmatch "boost-mpi" }) -join ", "
|
||||
|
||||
@(
|
||||
"# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1"
|
||||
"# Automatically generated by scripts/boost/generate-ports.ps1"
|
||||
"Source: boost"
|
||||
"Version: $version"
|
||||
"Port-Version: $($port_versions.boost)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user