2017-05-25 14:33:16 +08:00
|
|
|
# vcpkg_acquire_msys
|
|
|
|
|
|
|
|
Download and prepare an MSYS2 instance.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
```cmake
|
2018-02-24 16:00:51 +08:00
|
|
|
vcpkg_acquire_msys(<MSYS_ROOT_VAR> [PACKAGES <package>...])
|
2017-05-25 14:33:16 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
### MSYS_ROOT_VAR
|
|
|
|
An out-variable that will be set to the path to MSYS2.
|
|
|
|
|
2018-02-24 16:00:51 +08:00
|
|
|
### PACKAGES
|
|
|
|
A list of packages to acquire in msys.
|
|
|
|
|
|
|
|
To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)`
|
|
|
|
|
2017-05-25 14:33:16 +08:00
|
|
|
## Notes
|
|
|
|
A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`:
|
|
|
|
```cmake
|
|
|
|
vcpkg_acquire_msys(MSYS_ROOT)
|
|
|
|
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
|
|
|
|
|
|
|
|
vcpkg_execute_required_process(
|
|
|
|
COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh"
|
|
|
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
|
|
|
LOGNAME build-${TARGET_TRIPLET}-rel
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
* [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake)
|
|
|
|
* [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake)
|
|
|
|
* [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake)
|
|
|
|
|
|
|
|
## Source
|
|
|
|
[scripts/cmake/vcpkg_acquire_msys.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_acquire_msys.cmake)
|