Skip to content

Commit 7874914

Browse files
committed
feat: add support for Emscripten builds by conditionally including icons; update Makefile.am to handle missing icons for Emscripten
1 parent b007f34 commit 7874914

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ AC_DEFUN([AC_DATAROOTDIR_CHECKED])
289289
AS_IF([test "x$enable_emscripten" = "xyes"],
290290
EXEEXT=".html"
291291
)
292+
AC_SUBST([enable_emscripten])
293+
AM_CONDITIONAL([ENABLE_EMSCRIPTEN], [test "x$enable_emscripten" = "xyes"])
292294

293295
AC_CONFIG_FILES([
294296
Makefile

data/Makefile.am

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,30 @@ EXTRA_DIST= \
1515
convert-icon
1616

1717
iconsdir = $(prefix)/share/icons/hicolor/128x128/apps
18-
icons_DATA = @[email protected] \
19-
20-
21-
22-
18+
19+
# For Emscripten builds, skip hexen.png and strife.png if they don't exist
20+
@ENABLE_EMSCRIPTEN_TRUE@icons_DATA = @[email protected] \
21+
@ENABLE_EMSCRIPTEN_TRUE@ @[email protected] \
22+
@ENABLE_EMSCRIPTEN_TRUE@ @[email protected]
23+
@ENABLE_EMSCRIPTEN_FALSE@icons_DATA = @[email protected] \
24+
@ENABLE_EMSCRIPTEN_FALSE@ @[email protected] \
25+
@ENABLE_EMSCRIPTEN_FALSE@ @[email protected] \
26+
@ENABLE_EMSCRIPTEN_FALSE@ @[email protected] \
27+
@ENABLE_EMSCRIPTEN_FALSE@ @[email protected]
2328

2429
@[email protected] : doom.png
2530
cp $(top_srcdir)/data/doom.png $@
2631

2732
@[email protected] : heretic.png
2833
cp $(top_srcdir)/data/heretic.png $@
2934

30-
@[email protected] : hexen.png
31-
cp $(top_srcdir)/data/hexen.png $@
35+
@ENABLE_EMSCRIPTEN_FALSE@@[email protected] : hexen.png
36+
@ENABLE_EMSCRIPTEN_FALSE@ cp $(top_srcdir)/data/hexen.png $@
3237

3338
@[email protected] : setup.png
3439
cp $(top_srcdir)/data/setup.png $@
3540

36-
@[email protected] : strife.png
37-
cp $(top_srcdir)/data/strife.png $@
41+
@ENABLE_EMSCRIPTEN_FALSE@@[email protected] : strife.png
42+
@ENABLE_EMSCRIPTEN_FALSE@ cp $(top_srcdir)/data/strife.png $@
3843

3944
CLEANFILES = $(icons_DATA)

0 commit comments

Comments
 (0)