mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 02:48:06 +08:00
Recommend self-contain repos/submodules regardless of build system. (#32698)
Fixes #31466.
This commit is contained in:
parent
06a42bb8ab
commit
491d01935a
13
README.md
13
README.md
@ -62,11 +62,10 @@ Prerequisites:
|
|||||||
- [Git][getting-started:git]
|
- [Git][getting-started:git]
|
||||||
- [Visual Studio][getting-started:visual-studio] 2015 Update 3 or greater with the English language pack
|
- [Visual Studio][getting-started:visual-studio] 2015 Update 3 or greater with the English language pack
|
||||||
|
|
||||||
First, download and bootstrap vcpkg itself; it can be installed anywhere,
|
First, download and bootstrap vcpkg itself; it can be installed anywhere, but generally we recommend using vcpkg as a
|
||||||
but generally we recommend using vcpkg as a submodule for CMake projects,
|
submodule so the consuming repo can stay self-contained. Alternatively, vcpkg can be installed globally; we recommend
|
||||||
and installing it globally for Visual Studio projects.
|
somewhere like `C:\src\vcpkg` or `C:\dev\vcpkg`, since otherwise you may run into path issues for some port build
|
||||||
We recommend somewhere like `C:\src\vcpkg` or `C:\dev\vcpkg`,
|
systems.
|
||||||
since otherwise you may run into path issues for some port build systems.
|
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
> git clone https://github.com/microsoft/vcpkg
|
> git clone https://github.com/microsoft/vcpkg
|
||||||
@ -133,7 +132,7 @@ Prerequisites for macOS:
|
|||||||
- [Apple Developer Tools][getting-started:macos-dev-tools]
|
- [Apple Developer Tools][getting-started:macos-dev-tools]
|
||||||
|
|
||||||
First, download and bootstrap vcpkg itself; it can be installed anywhere,
|
First, download and bootstrap vcpkg itself; it can be installed anywhere,
|
||||||
but generally we recommend using vcpkg as a submodule for CMake projects.
|
but generally we recommend using vcpkg as a submodule.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ git clone https://github.com/microsoft/vcpkg
|
$ git clone https://github.com/microsoft/vcpkg
|
||||||
@ -237,7 +236,7 @@ Finally, in `CMake options`, add the following line:
|
|||||||
|
|
||||||
You must add this line to each profile.
|
You must add this line to each profile.
|
||||||
|
|
||||||
### Vcpkg as a Submodule
|
### Vcpkg as a Submodule with CMake
|
||||||
|
|
||||||
When using vcpkg as a submodule of your project,
|
When using vcpkg as a submodule of your project,
|
||||||
you can add the following to your CMakeLists.txt before the first `project()` call,
|
you can add the following to your CMakeLists.txt before the first `project()` call,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user