diff options
| author | Griffin Downs <grdowns@microsoft.com> | 2019-02-27 16:44:17 -0800 |
|---|---|---|
| committer | Griffin Downs <grdowns@microsoft.com> | 2019-02-27 16:44:17 -0800 |
| commit | 1908903508bf057ad05d8a344e5bc55477944cb6 (patch) | |
| tree | 2a23595f1e7d8cc9a6358bfd44a00eb7368d8a1b /docs/examples | |
| parent | b0a2ff18c9f2c9131aed131f5bf0d97c0e23da8e (diff) | |
| parent | 8564602d06d7c4ce236f96a4f0f3ba7c2d769cb0 (diff) | |
| download | vcpkg-1908903508bf057ad05d8a344e5bc55477944cb6.tar.gz vcpkg-1908903508bf057ad05d8a344e5bc55477944cb6.zip | |
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/grdowns/4802
Diffstat (limited to 'docs/examples')
| -rw-r--r-- | docs/examples/installing-and-using-packages.md | 4 | ||||
| -rw-r--r-- | docs/examples/patching.md | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/docs/examples/installing-and-using-packages.md b/docs/examples/installing-and-using-packages.md index 50200c877..73f9d29a9 100644 --- a/docs/examples/installing-and-using-packages.md +++ b/docs/examples/installing-and-using-packages.md @@ -89,7 +89,8 @@ To remove the integration for your user, you can use `.\vcpkg integrate remove`. <a name="cmake"></a> #### CMake (Toolchain File) -The best way to use installed libraries with cmake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake`. +The best way to use installed libraries with cmake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as: +`-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake`. If you are using CMake through Open Folder with Visual Studio 2017 you can define `CMAKE_TOOLCHAIN_FILE` by adding a "variables" section to each of your `CMakeSettings.json` configurations: @@ -109,6 +110,7 @@ If you are using CMake through Open Folder with Visual Studio 2017 you can defin }] } ``` +*Note: It might be necessary to delete the CMake cache folder of each modified configuration, to force a full regeneration. In the `CMake` menu, under `Cache (<configuration name>)` you'll find `Delete Cache Folders`.* Now let's make a simple CMake project with a main file. ```cmake diff --git a/docs/examples/patching.md b/docs/examples/patching.md index 98115400e..b152231e2 100644 --- a/docs/examples/patching.md +++ b/docs/examples/patching.md @@ -147,11 +147,11 @@ Finally, we need to apply the patch after extracting the source. ```cmake # ports\libpng\portfile.cmake ... -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.24 - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch" +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + "use-abort-on-all-platforms.patch" ) vcpkg_configure_cmake( |
