mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
In #22522 I said:
> RC="zig rc" will now work in combination with zig cc and CMake. Here's an example of cross-compiling a simple Windows GUI CMake project
>
> $ RC="zig rc" CC="zig cc --target=x86_64-windows-gnu" cmake .. -DCMAKE_SYSTEM_NAME=Windows -G Ninja
However, I didn't realize that the time that this only works because of the `-G Ninja` part. When not using Ninja as the build tool, CMake adds a workaround for 'very long lists of object files' where it takes all object files and runs them through `ar` to combine them into one archive:
|
||
|---|---|---|
| .. | ||
| aro | ||
| aro_translate_c | ||
| reduce | ||
| resinator | ||
| aro_translate_c.zig | ||
| build_runner.zig | ||
| libc.zig | ||
| objcopy.zig | ||
| reduce.zig | ||
| std-docs.zig | ||
| test_runner.zig | ||