2018-11-07 07:47:02 +08:00
|
|
|
# vcpkg_from_git
|
|
|
|
|
2021-03-11 01:56:07 +08:00
|
|
|
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_git.md).
|
2021-03-01 05:17:19 +08:00
|
|
|
|
2018-11-07 07:47:02 +08:00
|
|
|
Download and extract a project from git
|
|
|
|
|
|
|
|
## Usage:
|
|
|
|
```cmake
|
|
|
|
vcpkg_from_git(
|
|
|
|
OUT_SOURCE_PATH <SOURCE_PATH>
|
|
|
|
URL <https://android.googlesource.com/platform/external/fdlibm>
|
|
|
|
REF <59f7335e4d...>
|
2021-07-15 03:45:18 +08:00
|
|
|
[HEAD_REF <ref>]
|
2018-11-07 07:47:02 +08:00
|
|
|
[PATCHES <patch1.patch> <patch2.patch>...]
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters:
|
|
|
|
### OUT_SOURCE_PATH
|
|
|
|
Specifies the out-variable that will contain the extracted location.
|
|
|
|
|
|
|
|
This should be set to `SOURCE_PATH` by convention.
|
|
|
|
|
|
|
|
### URL
|
2020-04-01 22:35:38 +08:00
|
|
|
The url of the git repository.
|
2018-11-07 07:47:02 +08:00
|
|
|
|
|
|
|
### REF
|
2019-07-02 13:39:51 +08:00
|
|
|
The git sha of the commit to download.
|
2018-11-07 07:47:02 +08:00
|
|
|
|
2021-07-15 03:45:18 +08:00
|
|
|
### HEAD_REF
|
|
|
|
The git branch to use when the package is requested to be built from the latest sources.
|
|
|
|
|
|
|
|
Example: `main`, `develop`, `HEAD`
|
2021-01-11 16:27:56 +08:00
|
|
|
|
2018-11-07 07:47:02 +08:00
|
|
|
### PATCHES
|
|
|
|
A list of patches to be applied to the extracted sources.
|
|
|
|
|
|
|
|
Relative paths are based on the port directory.
|
|
|
|
|
|
|
|
## Notes:
|
2019-07-02 13:39:51 +08:00
|
|
|
`OUT_SOURCE_PATH`, `REF`, and `URL` must be specified.
|
2018-11-07 07:47:02 +08:00
|
|
|
|
|
|
|
## Examples:
|
|
|
|
|
|
|
|
* [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake)
|
|
|
|
|
|
|
|
## Source
|
2021-03-01 05:17:19 +08:00
|
|
|
[scripts/cmake/vcpkg\_from\_git.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_git.cmake)
|