mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 19:59:07 +08:00
3426db05b9
* [scripts-audit rollup] PR #16419 * pull the cmake doc comment parsing out into its own function * support cmake helper ports * add real support for deprecation, as opposed to ad-hoc * [scripts-audit rollup] PR #16192 * add a z_ in front of internal functions * move internal functions out set feature_vars again in parent scope * [scripts-audit rollup] PR #16309 Audit vcpkg_copy_pdbs * [scripts-audit rollup] PR #16304 * Fix usage, documentation * [scripts-audit rollup] PR #16393 * [scripts-audit rollup] PR #16377 Deprecate `vcpkg_*_cmake` in favor of `vcpkg_cmake_*` from the `vcpkg-cmake` port, as well as `vcpkg_fixup_cmake_targets` in favor of `vcpkg_cmake_config_fixup` from the `vcpkg-cmake-config` port.
62 lines
2.1 KiB
Markdown
62 lines
2.1 KiB
Markdown
# vcpkg_from_bitbucket
|
|
|
|
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/maintainers/vcpkg_from_bitbucket.md).
|
|
|
|
Download and extract a project from Bitbucket.
|
|
Enables support for installing HEAD `vcpkg.exe install --head <port>`.
|
|
|
|
## Usage:
|
|
```cmake
|
|
vcpkg_from_bitbucket(
|
|
OUT_SOURCE_PATH <SOURCE_PATH>
|
|
REPO <Microsoft/cpprestsdk>
|
|
[REF <v2.0.0>]
|
|
[SHA512 <45d0d7f8cc350...>]
|
|
[HEAD_REF <master>]
|
|
[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.
|
|
|
|
### REPO
|
|
The organization or user and repository on GitHub.
|
|
|
|
### REF
|
|
A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.**
|
|
|
|
For repositories without official releases, this can be set to the full commit id of the current latest master.
|
|
|
|
If `REF` is specified, `SHA512` must also be specified.
|
|
|
|
### SHA512
|
|
The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz).
|
|
|
|
This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile.
|
|
|
|
### HEAD_REF
|
|
The unstable git commit-ish (ideally a branch) to pull for `--head` builds.
|
|
|
|
For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms.
|
|
|
|
### PATCHES
|
|
A list of patches to be applied to the extracted sources.
|
|
|
|
Relative paths are based on the port directory.
|
|
|
|
## Notes:
|
|
At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.
|
|
|
|
This exports the `VCPKG_HEAD_VERSION` variable during head builds.
|
|
|
|
## Examples:
|
|
|
|
* [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake)
|
|
|
|
## Source
|
|
[scripts/cmake/vcpkg\_from\_bitbucket.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_bitbucket.cmake)
|