Skip to content
Discussion options

You must be logged in to vote

In my experience, if you have to ask "is a custom triplet required to do x", the answer is always yes.

In my project, I create a custom triplet, and have it load a build-time file, like so:

arm64-osx.cmake

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_OSX_ARCHITECTURES arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_OSX_SYSROOT macosx)

include(${_VCPKG_INSTALLED_DIR}/../build-vcpkg-variables.cmake OPTIONAL)

And then generate that vcpkg variables file like this:

generate_vcpkg_toolchain_variables.cmake

set(EXTRA_VCPKG_VARIABLES "")
if (CMAKE_OSX_DEPLOYMENT_TARGET)
    string(APPEND EXTRA_VCPKG_VARIABLES "set(VCPKG_OSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEP…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Nika0000
Comment options

Answer selected by Nika0000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants