]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | # vcpkg_extract_source_archive_ex |
2 | ||
3 | The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_extract_source_archive_ex.md). | |
4 | ||
5 | Extract an archive into the source directory. Replaces [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md). | |
6 | ||
7 | ## Usage | |
8 | ```cmake | |
9 | vcpkg_extract_source_archive_ex( | |
10 | SKIP_PATCH_CHECK | |
11 | OUT_SOURCE_PATH <SOURCE_PATH> | |
12 | ARCHIVE <${ARCHIVE}> | |
13 | [REF <1.0.0>] | |
14 | [NO_REMOVE_ONE_LEVEL] | |
15 | [WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/src>] | |
16 | [PATCHES <a.patch>...] | |
17 | ) | |
18 | ``` | |
19 | ## Parameters | |
20 | ### SKIP_PATCH_CHECK | |
21 | If this option is set the failure to apply a patch is ignored. | |
22 | ||
23 | ### OUT_SOURCE_PATH | |
24 | Specifies the out-variable that will contain the extracted location. | |
25 | ||
26 | This should be set to `SOURCE_PATH` by convention. | |
27 | ||
28 | ### ARCHIVE | |
29 | The full path to the archive to be extracted. | |
30 | ||
31 | This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). | |
32 | ||
33 | ### REF | |
34 | A friendly name that will be used instead of the filename of the archive. If more than 10 characters it will be truncated. | |
35 | ||
36 | By convention, this is set to the version number or tag fetched | |
37 | ||
38 | ### WORKING_DIRECTORY | |
39 | If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. | |
40 | ||
41 | Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). | |
42 | ||
43 | ### PATCHES | |
44 | A list of patches to be applied to the extracted sources. | |
45 | ||
46 | Relative paths are based on the port directory. | |
47 | ||
48 | ### NO_REMOVE_ONE_LEVEL | |
49 | Specifies that the default removal of the top level folder should not occur. | |
50 | ||
51 | ## Examples | |
52 | ||
53 | * [bzip2](https://github.com/Microsoft/vcpkg/blob/master/ports/bzip2/portfile.cmake) | |
54 | * [sqlite3](https://github.com/Microsoft/vcpkg/blob/master/ports/sqlite3/portfile.cmake) | |
55 | * [cairo](https://github.com/Microsoft/vcpkg/blob/master/ports/cairo/portfile.cmake) | |
56 | ||
57 | ## Source | |
58 | [scripts/cmake/vcpkg\_extract\_source\_archive\_ex.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive_ex.cmake) |