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:
|
||
|---|---|---|
| .. | ||
| ani.zig | ||
| ast.zig | ||
| bmp.zig | ||
| cli.zig | ||
| code_pages.zig | ||
| comments.zig | ||
| compile.zig | ||
| cvtres.zig | ||
| disjoint_code_page.zig | ||
| errors.zig | ||
| ico.zig | ||
| lang.zig | ||
| lex.zig | ||
| literals.zig | ||
| main.zig | ||
| parse.zig | ||
| preprocess.zig | ||
| rc.zig | ||
| res.zig | ||
| source_mapping.zig | ||
| utils.zig | ||
| windows1252.zig | ||