Replies: 3 comments 8 replies
-
As far as I understand, registries is just for your case. There is a default registry (providing default ports), and there are additional registries (providing explicitly selected ports). You have to decide which registry is the default, vcpkg or your custom registry. Example
|
Beta Was this translation helpful? Give feedback.
-
There is an experimental parameter which changes the install root for all ports: $ ./vcpkg --help
...
--x-install-root=<path> (Experimental) Specify the install root directory
... To use this with build system integration in manifest mode, you will proably need to adjust |
Beta Was this translation helpful? Give feedback.
-
Last not least, there are use cases which are not expected by upstream projects. Than you will have to patch their buildsystem. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Recently, I've been looking at manifests and versioning in vcpkg -- it does look quite promising. Our use case is slightly different from what vcpkg seems to be targeting at the moment, since we tend to build most of our top-level dependencies ourselves (usually applying some custom patches and other tweaks) and check them into our SCM, so some of the recent additions to vcpkg (binary caching and registries) seem less relevant to us -- I would greatly appreciate the ability to export installed libraries from a project that uses manifests and versioning, since we'd like to use vcpkg to handle building the dependencies of our top-level dependencies as it makes the entire process much easier!
This is about something slightly different, however -- the vcpkg CMake toolchain file that very neatly (I have to admit) integrates package management into CMake-based projects. At the moment, it would appear, when used in the manifest mode, the vcpkg toolchain file will by default install the libraries into the
vcpkg_installed
sub-directory of the build directory. That default seems to be controlled by the_VCPKG_INSTALLED_DIR
CMake variable in the toolchain file. I take that the leading underscore is meant to indicate that this variable is an implementation detail and users should not touch it. I understand the desire to keep things simple, but I would argue that the ability to customize the location where the libraries are installed can be useful.As an example, consider one of the libraries available in vcpkg: OpenImageIO. This is one of the libraries that we build ourselves, instead of installing it via vcpkg, since we need a custom build. As a part of the configuration process, it defines a target for its utility library (OpenImageIO_Util) and adds public headers from its dependencies (OpenEXR) as a part of its public interface. CMake spots that and produces the following error message (one of many):
Moving the
vcpkg_installed
directory out of the build dir by setting_VCPKG_INSTALLED_DIR
to a directory outside the build directory solves the issue.So I would appreciate the ability to customize the location of the
vcpkg_installed
library, when using the CMake toolchain file for vcpkg in manifest mode. That, or it shouldn't be put in the build directory by default, but I'm assuming you had good reasons to go with that choice.Beta Was this translation helpful? Give feedback.
All reactions