summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-11-17 11:47:05 -0500
committerFreya Murphy <freya@freyacat.org>2025-11-17 11:47:05 -0500
commitc87821116dc15a306a423bb37dd7e9237fb541c3 (patch)
tree6ebac5a7fd8daa0ee9ea3deab7e3ae70dda26889
parentwasm: remove unneeded flags/pkgs (diff)
downloadDungeonCrawl-c87821116dc15a306a423bb37dd7e9237fb541c3.tar.gz
DungeonCrawl-c87821116dc15a306a423bb37dd7e9237fb541c3.tar.bz2
DungeonCrawl-c87821116dc15a306a423bb37dd7e9237fb541c3.zip
wasm: fix C_INCLUDE_PATH for non wasm builds
-rw-r--r--Makefile1
-rw-r--r--flake.nix1
-rw-r--r--game/Cargo.toml2
3 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 02586da..06b3401 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ dist:
env \
CC=emcc \
EMCC_CFLAGS="$(EMCC_CFLAGS)" \
+ C_INCLUDE_PATH="$(EMSDK_SYSROOT)/include:$C_INCLUDE_PATH" \
cargo build --target wasm32-unknown-emscripten --profile wasm
mkdir -p dist
cp ./target/wasm32-unknown-emscripten/wasm/game.{js,wasm} dist
diff --git a/flake.nix b/flake.nix
index 744a228..ba35e69 100644
--- a/flake.nix
+++ b/flake.nix
@@ -63,7 +63,6 @@
# setup wasm
export PATH="$EMSDK/share/emscripten:$PATH"
- export C_INCLUDE_PATH="$EMSDK_SYSROOT/include:$C_INCLUDE_PATH"
export EM_CACHE="$HOME"/.emscripten_cache
'';
diff --git a/game/Cargo.toml b/game/Cargo.toml
index af4a533..0e64d0e 100644
--- a/game/Cargo.toml
+++ b/game/Cargo.toml
@@ -22,5 +22,5 @@ sdl = ["graphics/sdl"]
static = ["graphics/static"]
# desktop dependencies
-[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
+[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))'.dependencies]
argh.workspace = true