From ab78c3b6edc666d81bb4389cea70f8e8779f9e40 Mon Sep 17 00:00:00 2001 From: paercebal Date: Tue, 29 Aug 2017 17:56:11 +0200 Subject: Add doc on Vcpkg integration for custom config --- docs/about/faq.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs') diff --git a/docs/about/faq.md b/docs/about/faq.md index 85a0c14db..9178f9b9a 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -46,6 +46,20 @@ Yes. In the current preview, there is not yet a standardized global way to chang By saving the changes to the portfile (and checking them in), you'll get the same results even if you're rebuilding from scratch in the future and forgot what exact settings you used. +## Can I get Vcpkg integration for custom configurations? + +Yes. While Vcpkg will only produce the standard "Release" and "Debug" configurations when building a library, you can get integration support for your projects' custom configurations, in addition to your project's standard configurations. + +The MSBuild $(VcpkgConfiguration) macro, if not set in your project, will identify either the "Release" or the "Debug" configuration. You only need to override this macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. + +For example, you can add support for your "MyRelease" configuration by adding in your project file: +``` + + Release + +``` +Of course, this will only produce viable binaries if your custom configuration is compatible with the target configuration (e.g. they should both link with the same runtime library). + ## How is CMake used internally by Vcpkg? Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users. -- cgit v1.2.3 From 23649f58ec58196ff6e7f0b25f2d13f4b0c27cc9 Mon Sep 17 00:00:00 2001 From: paercebal Date: Tue, 29 Aug 2017 18:21:31 +0200 Subject: Add doc on Vcpkg integration per project --- docs/about/faq.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/about/faq.md b/docs/about/faq.md index 9178f9b9a..43039258f 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -60,6 +60,14 @@ For example, you can add support for your "MyRelease" configuration by adding in ``` Of course, this will only produce viable binaries if your custom configuration is compatible with the target configuration (e.g. they should both link with the same runtime library). +## I can't use user-wide integration. Can I use a per-project integration? + +Yes. The Visual Studio integration is actually enabled by the `\scripts\buildsystems\msbuild\vcpkg.targets` file. So all you need is to import it in your .vcxproj file, replacing `` with the path where you installed vcpkg: + +``` + +``` + ## How is CMake used internally by Vcpkg? Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users. -- cgit v1.2.3 From b966cdce678461e5497b01a25664ace0e76b51bf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 30 Aug 2017 21:00:59 -0700 Subject: [vcpkg-docs] Add integrate project to faq section --- docs/about/faq.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/about/faq.md b/docs/about/faq.md index 43039258f..8234216e0 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -62,7 +62,9 @@ Of course, this will only produce viable binaries if your custom configuration i ## I can't use user-wide integration. Can I use a per-project integration? -Yes. The Visual Studio integration is actually enabled by the `\scripts\buildsystems\msbuild\vcpkg.targets` file. So all you need is to import it in your .vcxproj file, replacing `` with the path where you installed vcpkg: +Yes. A NuGet package suitable for per-project use can be generated via either the `vcpkg integrate project` command (lightweight linking) or the `vcpkg export --nuget` command (shrinkwrapped). + +A lower level mechanism to achieve the same as the `vcpkg integrate project` NuGet package is via the `\scripts\buildsystems\msbuild\vcpkg.targets` file. All you need is to import it in your .vcxproj file, replacing `` with the path where you installed vcpkg: ``` -- cgit v1.2.3 From e5861d356bf2b1874b74a321dcec9439a8d11ef5 Mon Sep 17 00:00:00 2001 From: paercebal Date: Thu, 31 Aug 2017 10:59:42 +0200 Subject: Updated the documentation to reflect the greater tolerance on configs --- docs/about/faq.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/about/faq.md b/docs/about/faq.md index 8234216e0..88f88bad0 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -50,7 +50,9 @@ By saving the changes to the portfile (and checking them in), you'll get the sam Yes. While Vcpkg will only produce the standard "Release" and "Debug" configurations when building a library, you can get integration support for your projects' custom configurations, in addition to your project's standard configurations. -The MSBuild $(VcpkgConfiguration) macro, if not set in your project, will identify either the "Release" or the "Debug" configuration. You only need to override this macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. +First of all, Vcpkg will automatically assume any custom configuration starting with "Release" (resp. "Debug") as a configuration that is compatible with the standard "Release" (resp. "Debug") configuration and will act accordingly. + +For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. For example, you can add support for your "MyRelease" configuration by adding in your project file: ``` -- cgit v1.2.3