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

vcpkg manifest mode dependencies not filtered by platform #12538

Closed
linquize opened this issue Jul 22, 2020 · 1 comment · Fixed by #12548
Closed

vcpkg manifest mode dependencies not filtered by platform #12538

linquize opened this issue Jul 22, 2020 · 1 comment · Fixed by #12548
Assignees

Comments

@linquize
Copy link

linquize commented Jul 22, 2020

Currently, vcpkg manifest mode dependencies are not filtered by platform.

Line 761 of toolsrc/src/vcpkg/install.cpp

                for (auto& dep : (*val)->core_paragraph->dependencies)
                {
                    specs.push_back(FullPackageSpec{
                        {std::move(dep.name), default_triplet},
                        std::move(dep.features),
                    });
                }

It should filter by platform in this code block.

This is my vcpkg.json in my project.

{
  "name": "sshtest",
  "version-string": "dev",
  "dependencies": [
    {
      "name": "libssh",
      "features": ["mbedtls"],
      "platform": "windows"
    }
  ]
}

Run cmake on Linux. Expected libssh is not installed. But actual libssh is still installed.
Run cmake on Windows. Expected libssh is installed. Actual libssh is installed.

@strega-nil
Copy link
Contributor

strega-nil commented Jul 23, 2020

Fixing this now, thanks @linquize for bringing this to my attention!

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

Successfully merging a pull request may close this issue.

2 participants