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

Keeping multiple triplets when use vcpkg install #16083

Closed
autoantwort opened this issue Feb 7, 2021 · 10 comments
Closed

Keeping multiple triplets when use vcpkg install #16083

autoantwort opened this issue Feb 7, 2021 · 10 comments
Assignees
Labels
category:question This issue is a question

Comments

@autoantwort
Copy link
Contributor

Describe the bug
We have a solution with multiple projects, some are x64 and some x86. We use a manifest file for the whole solution to specify the dependencies. The problem is, that when you build a x64 project, it removes the x86 versions of the dependencies and the other way around.

Environment

  • OS: Windows
  • Compiler: Visual Studio 2015

To Reproduce
Steps to reproduce the behavior:

  1. Use a manifest file
  2. Have a solution with x86 and x64 Projects
  3. Build the solution

Expected behavior
Do not remove the installed versions of other triplets.

Additional context
Maybe the same as #12525, but we don't use cmake

@JackBoosY JackBoosY added the category:question This issue is a question label Feb 7, 2021
@JackBoosY
Copy link
Contributor

@strega-nil Can you please take a look?

@strega-nil
Copy link
Contributor

@autoantwort What we recommend here is to set the installed directory based upon the thing you're building for; in your settings, you should be able to set the installed directory to, for example, vcpkg-installed_x64 for x64, and vcpkg-installed_win32 for win32, or whatever you wish.

Unfortunately, it seems like we don't actually have that option in the vcpkg properties pane; I will open an issue for that, and it should be a pretty easy fix.

@autoantwort
Copy link
Contributor Author

in your settings

Which settings? Do you mean the *.vcxproj project files?

Unfortunately, it seems like we don't actually have that option in the vcpkg properties pane; I will open an issue for that, and it should be a pretty easy fix.

<StringProperty Name="VcpkgCurrentInstalledDir" DisplayName="Package install directory" Category="General" Subtype="folder" Visible="false"

Probably you only have to remove Visible="false"

But imho this is not a very user friendly and intuitive solution. It would be more user friendly if you don't remove installed packages from other triplets. Then vcpkg just works out of the box.

@autoantwort
Copy link
Contributor Author

When I change VcpkgCurrentInstalledDir, nothing changed. If I change VcpkgInstalledDir, vcpkg initially does not work anymore, because you have to create the installed dirs yourself (copy existing installed dir and rename it).
Finally it worked with:

  <PropertyGroup Label="Vcpkg">
    <VcpkgInstalledDir>$(VcpkgRoot)$(VcpkgPlatformTarget)_installed\</VcpkgInstalledDir>
  </PropertyGroup>

I used a property sheet, because I don't want to change that manuelly in over hundred projects ...

@autoantwort
Copy link
Contributor Author

Btw, if I change VcpkgCurrentInstalledDir and VcpkgInstalledDir, vcpkg only returns 1 and does nothing.

@strega-nil
Copy link
Contributor

@autoantwort unfortunately, this isn't really a thing we can do? There's too much cross-talk, especially with #15424, to really support having two different triplets installed.

@autoantwort
Copy link
Contributor Author

Ok. My naive assumption was that you can simply ignore packages from other triplets in the implementation, but it seems to be more complicated.

@JackBoosY
Copy link
Contributor

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.

@autoantwort
Copy link
Contributor Author

BTW this is now fixed in the latest master

@russelltg
Copy link
Contributor

This would be great to have--using --x-install-root is a workaround but it's not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

4 participants