R3t
R3t

Reputation: 53

C++ VSCode CMake VCPKG: manifests are not enabled

I'm trying to build the Supertux-C++-Project like in this Video.

I installed the VS Code extensions for C++ and CMake, and I'm using the GCC compiler. I cloned the VCPKG-Repository and executed the bootstrap-vcpkg.bat. After that, I ran ./vcpkg integrate install and got the message:

Applied user-wide integration for this vcpkg root.

The .vscode\settings.json looks like:

{
    "cmake.configureSettings": {
        "CMAKE_TOOLCHAIN_FILE": "D:/_programming/_repos/vcpkg/scripts/buildsystems/vcpkg.cmake",
        "VCPKG_BUILD": "ON",
    }
}

Then I created a vcpkg.json file in my Supertux-Project-Folder and inserted the necessary libraries:

{
    "name": "supertux-example",
    "version": "0.0.1",
    "dependencies": [
        "sdl2",
        "sdl2-image",
        "openal-soft",
        "curl",
        "libogg",
        "libvorbis",
        "freetype",
        "glew",
        "boost-date-time",
        "boost-filesystem",
        "boost-format",
        "boost-locale",
        "boost-system"
    ]
}

Now I'm trying to access all these libraries with the command: D:\_programming\_repos\vcpkg\vcpkg.exe install --triplet "x64-windows" --binarycaching but I get the following error message:

Warning: manifest-root detected at D:/_programming/cpp/supertux, but manifests are not enabled.
If you wish to use manifest mode, you may do one of the following:
    * Add the `manifests` feature flag to the comma-separated environment
      variable `VCPKG_FEATURE_FLAGS`.
    * Add the `manifests` feature flag to the `--feature-flags` option.
    * Pass your manifest directory to the `--x-manifest-root` option.
If you wish to silence this error and use classic mode, you can:
    * Add the `-manifests` feature flag to `VCPKG_FEATURE_FLAGS`.
    * Add the `-manifests` feature flag to `--feature-flags`.
Error: 'install' requires at least 1 arguments, but 0 were provided

Can someone tell me how to activate the manifest mode and explain me the concrete reason for this error? (I have not much experience using external libraries in my C++ projects.)

Upvotes: 5

Views: 8786

Answers (1)

Dean Johnson
Dean Johnson

Reputation: 1852

Manifests are a relatively new feature of vcpkg. It allows you to specify (via the vcpkg.json file) what your dependencies are. The old way meant there was really no way for vcpkg to automatically know your dependencies from looking at your project folder. You had to essentially install them manually.

Manifests mode is not enabled by default. It can be enabled by defining the environment variable VCPKG_FEATURE_FLAGS=manifests. It can also be enabled when directly calling vcpkg: D:\_programming\_repos\vcpkg\vcpkg.exe install --feature-flags=manifests,binarycaching --triplet "x64-windows".

Upvotes: 4

Related Questions