mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 17:29:00 +08:00
d369df7ecf
* [rollup:2021-07-06 1/8] PR #18272 (@strega-nil) [scripts-audit] vcpkg_from_* * [rollup:2021-07-06 2/8] PR #18319 (@strega-nil) [scripts-audit] add guidelines for cmake * [rollup 2021-07-06 3/8] PR #18410 (@mheyman) [vcpkg-cmake-config] documentation fix * [rollup:2021-07-06 4/8] PR #18488 (@strega-nil) [scripts-audit] vcpkg_execute_* * [rollup:2021-07-06 5/8] PR #18517 (@strega-nil) [scripts-audit] vcpkg_extract_source_archive * [rollup:2021-07-06 6/8] PR #18674 (@NancyLi1013) [vcpkg doc] Update examples * [rollup:2021-07-06 7/8] PR #18695 (@JackBoosY) [vcpkg] Update the minimum version of vcpkg * [rollup:2021-07-06 8/8] PR #18758 (@ras0219-msft) [vcpkg_from_git] Fix error if downloads folder does not exist * build docs! * fix bond:*-windows * fix nmap Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: Michael Heyman <Michael.Heyman@jhuapl.edu> Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Robert Schumacher <ras0219@outlook.com>
36 lines
1.2 KiB
CMake
36 lines
1.2 KiB
CMake
#[===[.md:
|
|
# vcpkg_extract_source_archive_ex
|
|
|
|
Extract an archive into the source directory.
|
|
Originally replaced [`vcpkg_extract_source_archive()`],
|
|
but new ports should instead use the second overload of
|
|
[`vcpkg_extract_source_archive()`].
|
|
|
|
## Usage
|
|
```cmake
|
|
vcpkg_extract_source_archive_ex(
|
|
[OUT_SOURCE_PATH <source_path>]
|
|
...
|
|
)
|
|
```
|
|
|
|
See the documentation for [`vcpkg_extract_source_archive()`] for other parameters.
|
|
Additionally, `vcpkg_extract_source_archive_ex()` adds the `REF` and `WORKING_DIRECTORY`
|
|
parameters, which are wrappers around `SOURCE_BASE` and `BASE_DIRECTORY`
|
|
respectively.
|
|
|
|
[`vcpkg_extract_source_archive()`]: vcpkg_extract_source_archive.md
|
|
#]===]
|
|
|
|
function(vcpkg_extract_source_archive_ex)
|
|
# OUT_SOURCE_PATH is an out-parameter so we need to parse it
|
|
cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "OUT_SOURCE_PATH" "")
|
|
if(NOT DEFINED arg_OUT_SOURCE_PATH)
|
|
message(FATAL_ERROR "OUT_SOURCE_PATH must be specified")
|
|
endif()
|
|
|
|
vcpkg_extract_source_archive(source_path ${arg_UNPARSED_ARGUMENTS} Z_ALLOW_OLD_PARAMETER_NAMES)
|
|
|
|
set("${arg_OUT_SOURCE_PATH}" "${source_path}" PARENT_SCOPE)
|
|
endfunction()
|