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 · 0 comments

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()
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

1 participant