Add function to setup -DCMAKE_TOOLCHAIN_FILE
/-DVCPKG_TOOLCHAIN_FILE
and include()
toolchain via -DOPT_TARGET_TRIPLET:STRING=x64-mingw-dynamic
option.
Example:
project_options(
TARGET_TRIPLET "x64-mingw-dynamic"
)
or with cmake arguments:
# for custom toolchains
cmake ... -DOPT_TOOLCHAIN_FILE:STRING="..." -DOPT_TARGET_TRIPLET:STRING="..."
## setup vcpkg and more
# use project_options toolchains
cmake ... -DOPT_TARGET_TRIPLET:STRING="..."
## setup vcpkg and more
# use vcpkg arguments
cmake ... -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="..." -DVCPKG_TARGET_TRIPLET="..."
## read vcpkg triplet and set OPT_TARGET_TRIPLET etc.
VCPKG_HOST_TRIPLET
, VCPKG_TRIPLET
and DVCPKG_CHAINLOAD_TOOLCHAIN_FILE
- https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md-DOPT_TARGET_TRIPLET
:
x64-mingw-dynamic
, x64-mingw-static
- for Windows buildsx86-mingw-dynamic
, x86-mingw-static
- for Windows builds (32-Bit) (optional?)arm64-linux
, arm-linux
or arm64-windows
, arm-windows
- for ARM buildswasm32-emscripten
- for WebASM/Emscripten (optional)-DANDROID_NDK
and -DANDROID_ABI
emscript
, set_target_properties(${target} PROPERTIES LINK_FLAGS "-s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY -s USE_PTHREADS=1 --bind")
Notes
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too