aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-09-21 12:22:00 -0700
committerGitHub <noreply@github.com>2017-09-21 12:22:00 -0700
commitfac96eb344a500405ab65b7e7f3755af0ad00b7e (patch)
treef9e3376ca1a8f2de408e087e42ae393f224d6c42 /docs
parent46db0f03fcb42d9f738474885fda372160362e44 (diff)
parent1bbce1ee844262647f994afd5f31da12d938e7ee (diff)
downloadvcpkg-fac96eb344a500405ab65b7e7f3755af0ad00b7e.tar.gz
vcpkg-fac96eb344a500405ab65b7e7f3755af0ad00b7e.zip
Merge branch 'master' into master
Diffstat (limited to 'docs')
-rw-r--r--docs/about/faq.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/about/faq.md b/docs/about/faq.md
index 85a0c14db..88f88bad0 100644
--- a/docs/about/faq.md
+++ b/docs/about/faq.md
@@ -46,6 +46,32 @@ 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.
+
+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:
+```
+<PropertyGroup>
+ <VcpkgConfiguration Condition="'$(Configuration)' == 'MyRelease'">Release</VcpkgConfiguration>
+</PropertyGroup>
+```
+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. 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 `<vcpkg_root>\scripts\buildsystems\msbuild\vcpkg.targets` file. All you need is to import it in your .vcxproj file, replacing `<vcpkg_root>` with the path where you installed vcpkg:
+
+```
+<Import Project="<vcpkg_root>\scripts\buildsystems\msbuild\vcpkg.targets" />
+```
+
## 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.