mrexodia / zig-cross

Example of using as a CMake Toolchain for cross compiling.
https://zig.news/kristoff/cross-compile-a-c-c-project-with-zig-3599
Boost Software License 1.0
82 stars 5 forks source link

Another reference: CMake-Zig #1

Open kassane opened 1 year ago

kassane commented 1 year ago

System Config

https://github.com/RodrigoDornelles/3bc-lang/blob/develop-wip/cmake/system/zig.cmake

Find or Download

https://github.com/RodrigoDornelles/3bc-lang/blob/develop-wip/cmake/find/zig.cmake

Target

https://github.com/RodrigoDornelles/3bc-lang/blob/develop-wip/cmake/toolchain/zig.cmake https://github.com/RodrigoDornelles/3bc-lang/blob/4b2a9564bba165ed99d73924ef93f959558496c2/cmake/target.cmake#L14-L22

mrexodia commented 2 months ago

Thanks for the feedback! I generalized the script to zig-toolchain.cmake, will also add the downloading later.