Skip to content

Commit 1d04fde

Browse files
committed
fix: build
1 parent 3f36647 commit 1d04fde

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/*.log
12
/subprojects/*/
23

34
# WASM build artifacts

build-wasm.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,21 @@ setup_environment() {
9393
# Configure build
9494
configure_build() {
9595
log "Configuring Meson build..."
96-
96+
97+
# Set up PKG_CONFIG paths for WASM dependencies
98+
local GLIB_ROOT="$(cd ../glib.wasm && pwd)/install"
99+
local CAIRO_ROOT="$(cd ../cairo.wasm && pwd)/install"
100+
local FONTCONFIG_ROOT="$(cd ../fontconfig.wasm && pwd)/install"
101+
local FREETYPE_ROOT="$(cd ../freetype.wasm && pwd)/install"
102+
local LIBPNG_ROOT="$(cd ../libpng.wasm && pwd)/install"
103+
local ZLIB_ROOT="$(cd ../zlib.wasm && pwd)/install"
104+
105+
# Set PKG_CONFIG_LIBDIR to find WASM libraries instead of system libraries
106+
export PKG_CONFIG_LIBDIR="${GLIB_ROOT}/lib/pkgconfig:${CAIRO_ROOT}/lib/pkgconfig:${FONTCONFIG_ROOT}/lib/pkgconfig:${FREETYPE_ROOT}/lib/pkgconfig:${LIBPNG_ROOT}/lib/pkgconfig:${ZLIB_ROOT}/lib/pkgconfig"
107+
unset PKG_CONFIG_PATH
108+
109+
log "PKG_CONFIG_LIBDIR set to use WASM dependencies"
110+
97111
# Remove existing build directory
98112
rm -rf "$BUILD_DIR"
99113

@@ -126,11 +140,11 @@ configure_build() {
126140
-Dgif=enabled \
127141
-Dothers=enabled \
128142
-Dtests=false \
129-
-Dintrospection=false \
143+
-Dintrospection=disabled \
130144
-Ddocumentation=false \
131145
-Dman=false \
132-
-Dthumbnailer=false \
133-
-Drelocatable=true \
146+
-Dthumbnailer=disabled \
147+
-Drelocatable=false \
134148
-Dgio_sniffing=false \
135149
-Dinstalled_tests=false
136150

wasm-cross.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ endian = 'little'
1818
[properties]
1919
sizeof_void_p = 4
2020
sizeof_wchar_t = 4
21+
pkg_config_libdir = '/home/isaac/src/discere/discere-nucleus/client/emscripten/glib.wasm/install/lib/pkgconfig:/home/isaac/.emscripten_cache/sysroot/share/pkgconfig:/home/isaac/.emscripten_cache/sysroot/lib/pkgconfig'
2122

2223
[built-in options]
2324
c_std = 'gnu99'

0 commit comments

Comments
 (0)