2020-12-02 05:37:26 +08:00
|
|
|
#[===[.md:
|
|
|
|
# vcpkg_extract_source_archive_ex
|
|
|
|
|
2021-07-15 03:45:18 +08:00
|
|
|
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()`].
|
2020-12-02 05:37:26 +08:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
```cmake
|
|
|
|
vcpkg_extract_source_archive_ex(
|
2021-07-15 03:45:18 +08:00
|
|
|
[OUT_SOURCE_PATH <source_path>]
|
|
|
|
...
|
2020-12-02 05:37:26 +08:00
|
|
|
)
|
|
|
|
```
|
|
|
|
|
2021-07-15 03:45:18 +08:00
|
|
|
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.
|
2020-12-02 05:37:26 +08:00
|
|
|
|
2021-07-15 03:45:18 +08:00
|
|
|
[`vcpkg_extract_source_archive()`]: vcpkg_extract_source_archive.md
|
2020-12-02 05:37:26 +08:00
|
|
|
#]===]
|
|
|
|
|
2018-11-23 06:48:18 +08:00
|
|
|
function(vcpkg_extract_source_archive_ex)
|
2021-07-15 03:45:18 +08:00
|
|
|
# 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")
|
2018-11-23 06:48:18 +08:00
|
|
|
endif()
|
|
|
|
|
2021-07-15 03:45:18 +08:00
|
|
|
vcpkg_extract_source_archive(source_path ${arg_UNPARSED_ARGUMENTS} Z_ALLOW_OLD_PARAMETER_NAMES)
|
2018-11-23 06:48:18 +08:00
|
|
|
|
2021-07-15 03:45:18 +08:00
|
|
|
set("${arg_OUT_SOURCE_PATH}" "${source_path}" PARENT_SCOPE)
|
2018-11-23 06:48:18 +08:00
|
|
|
endfunction()
|