Compare commits
2 commits
36eb4c57b7
...
86eece3bd8
Author | SHA1 | Date | |
---|---|---|---|
|
86eece3bd8 | ||
|
ba3836fbfb |
2
3rd-party/Tupfile
vendored
2
3rd-party/Tupfile
vendored
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
4
justfile
4
justfile
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue