diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-18 09:26:07 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-18 09:43:21 +0300 |
commit | e27925779b447955cfe93792a854da0d5ae28327 (patch) | |
tree | d73a53224f7a70df0227da619b1140fba5218a32 /.github/actions | |
parent | x64 as default platform, not auto (diff) | |
download | build-boost-e27925779b447955cfe93792a854da0d5ae28327.tar.gz build-boost-e27925779b447955cfe93792a854da0d5ae28327.zip |
add parameters static & static-runtime
Diffstat (limited to '.github/actions')
-rw-r--r-- | .github/actions/check-libraries/action.yml | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/.github/actions/check-libraries/action.yml b/.github/actions/check-libraries/action.yml index 8ef7c77..0e1812f 100644 --- a/.github/actions/check-libraries/action.yml +++ b/.github/actions/check-libraries/action.yml @@ -11,6 +11,10 @@ inputs: description: Toolset used required: false default: auto + static: + description: Look for static libraries + required: false + default: 0 runs: using: composite steps: @@ -20,16 +24,30 @@ runs: New-Variable librarydir -Value '${{ inputs.librarydir }}' -Option Constant New-Variable toolset -Value '${{ inputs.toolset }}' -Option Constant + New-Variable static -Value ('${{ inputs.static }}' -eq '1') -Option Constant + + dir $librarydir - $prefix = 'libboost_' - $ext = '.a' - if ($windows_host -and $toolset -in @('auto', 'clang', 'msvc')) { - $ext = '.lib' + if ($static) { + $prefix = 'lib' + $ext = '.a' + if ($windows_host -and $toolset -in @('auto', 'clang', 'msvc')) { + $ext = '.lib' + } + } else { + $prefix = 'lib' + if ($windows_host -and $toolset -in @('auto', 'clang', 'msvc')) { + $prefix = '' + } + $ext = '.so' + if ($windows_host) { + $ext = '.dll' + } } $expected = '${{ inputs.libraries }}' $expected = $expected.Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries) - $expected = $expected | %{"$prefix$_$ext"} + $expected = $expected | %{"${prefix}boost_$_$ext"} foreach ($lib in $expected) { $path = Join-Path $librarydir $lib |