Compare commits

..

2 commits

Author SHA1 Message Date
Fabien Freling 86eece3bd8 build raylib and raygui manually 2023-10-26 14:02:28 +02:00
Fabien Freling ba3836fbfb update app name 2023-10-26 14:02:28 +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 BDIR := ../build/raygui
: raygui.c |> clang -c %f -o %o -I../build/raylib/include -Iraygui/src |> $(BDIR)/%B.o : raygui.c |> clang -c %f -o %o -I../build/raylib/include -Iraygui/src |> $(BDIR)/%B.o
: *.o |> ar crs %o %f |> $(BDIR)/lib%B.a : $(BDIR)/*.o |> ar crs %o %f |> $(BDIR)/libraygui.a

View file

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

View file

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

View file

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