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

Allow projects using the CMake integration to automatically select an appropriate 'static' triplet #42843

Open
fredemmott opened this issue Dec 21, 2024 · 2 comments
Assignees
Labels
category:question This issue is a question

Comments

@fredemmott
Copy link

With MSBuild I can do something like this:

 <PropertyGroup Label="Globals">
 <!-- .... -->
 <VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
 <VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
</PropertyGroup>

it would be nice if I could do something similar when using the CMake project, instead of requiring the user to specify -DVCPKG_TARGET_TRIPLET

This isn't current possible as:

  • CMake doesn't make the architecture available until after project()
  • When using the vcpkg toolchain file, the triplet must be set before project()
@FrankXie05
Copy link
Contributor

You can set whether to enable the static option in the project properties of msbuild, and you can manually enter to select the existing installation triples.

Image

@FrankXie05 FrankXie05 added the category:question This issue is a question label Dec 23, 2024
@fredemmott
Copy link
Author

fredemmott commented Dec 23, 2024

@FrankXie05 this post is about cmake, not msbuild, and it is a vcpkg feature request, not a general usage question - i used vcpkg’s msbuild support as an example. your response is answering a different question to what I asked.

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

2 participants