Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different location of manifest vcpkg_installed between non-integrate and integrate with build system #349

Open
WangWeiLin-MV opened this issue Jun 28, 2024 · 0 comments
Assignees

Comments

@WangWeiLin-MV
Copy link

This issue is a duplicate of microsoft/vcpkg#39385, originally initiated by @wardw.

In manifest mode, when integrate vcpkg with build system, vcpkg_installed is placed in the build directory rather than the same directory that contains the manifest file which contradicts the documentation.

From documents

vcpkg/consume/manifest-mode and vcpkg/consume/manifest-mode.md

Therefore, each project can have its own manifest and its own set of dependencies that do not conflict with other projects' dependencies.

vcpkg/concepts/manifest-mode and vcpkg/concepts/manifest-mode.md

Instead, each manifest gets its own installation directory named vcpkg_installed; the vcpkg_installed directory is created in the same directory that contains the manifest file.

vcpkg/reference/installation-tree-layout and vcpkg/reference/installation-tree-layout.md

In manifest mode, each manifest file has a corresponding vcpkg_installed directory.

From codes

When using manifest mode, given vcpkg.json, taking the build tool CMake and the generator Visual Studio 17 2022 as an example:

  • For non-integrated usage

    • Install packages by the command line command vcpkg install
    • The vcpkg_installed directory is created in the same directory that contains the manifest file
    • See here vcpkg-tool:tag:2024-06-10:src/vcpkg/vcpkgpaths.cpp#L349 that InstalledPaths by manifest_dir / "vcpkg_installed"
  • For integrated usage

    • The packages are installed when CMake is generating project through the toolchain file
    • The vcpkg_installed directory is created in the build directory instead of like non-integrated mode.
    • This behavior changed in vcpkg-pr-12227-228ade9:scripts/buildsystems/vcpkg.cmake#L203 that from _VCPKG_MANIFEST_DIR to CMAKE_BINARY_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants