Skip to content

Commit

Permalink
Add doc on Vcpkg integration for custom config
Browse files Browse the repository at this point in the history
  • Loading branch information
paercebal committed Aug 29, 2017
1 parent 28e5815 commit ab78c3b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/about/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```
<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).

## 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.

Expand Down

0 comments on commit ab78c3b

Please sign in to comment.