Compare commits

..

1 commit

Author SHA1 Message Date
Fabien Freling 36eb4c57b7 [wip] build raylib and raygui manually 2023-10-24 14:12:19 +02:00
4 changed files with 7 additions and 7 deletions

2
3rd-party/Tupfile vendored
View file

@ -1,5 +1,5 @@
BDIR := ../build/raygui
: raygui.c |> clang -c %f -o %o -I../build/raylib/include -Iraygui/src |> $(BDIR)/%B.o
: $(BDIR)/*.o |> ar crs %o %f |> $(BDIR)/libraygui.a
: *.o |> ar crs %o %f |> $(BDIR)/lib%B.a

View file

@ -8,7 +8,7 @@ pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "fabapp",
.name = "zig",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,

View file

@ -19,7 +19,7 @@
# https://flake.parts/module-arguments.html#persystem-module-parameters
perSystem = { pkgs, system, ... }: {
# We need unstable for Zig
_module.args.pkgs = import inputs.nixpkgs-unstable {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
# https://flake.parts/overlays
overlays = [ inputs.zig-overlay.overlays.default ];
@ -44,8 +44,8 @@
sqlite
# Zig / webAssembly impl.
zig
# zigpkgs."0.11.0" # Issue with X11/GL libraries
# zig
zigpkgs."0.11.0" # Issue with X11/GL libraries
zls
emscripten

View file

@ -11,7 +11,7 @@ pre-build:
raylib: pre-build
mkdir -p {{ cpp_build_dir }}
cmake -B {{ cpp_build_dir }} -S {{ justfile_directory() }}/3rd-party/raylib \
-DBUILD_EXAMPLES=OFF
-DUSE_WAYLAND=ON -DBUILD_EXAMPLES=OFF
cmake --build {{ cpp_build_dir }}
raygui: raylib
@ -27,7 +27,7 @@ web-build: pre-build
zig build -Dtarget=wasm32-emscripten --sysroot /nix/store/lszbak7w3k1jmx3cm3qb2qzillsib71v-emscripten-3.1.24/bin/emcc
# zig build -Dtarget=wasm32-emscripten
run: build
run:
nixGL zig build run
test: