summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2023-03-04 13:43:45 -0800
committerLouie S <louie@example.com>2023-03-04 13:43:45 -0800
commit00403d8413157e08eeaba7a1932f17c3c7b0758e (patch)
tree6f2b20ff98092bd7cbac529d64bbd31b2519b909 /src/Makefile.am
parent712af9ea3cb3d0de866221ade19341fd114f7000 (diff)
Configure flag for disabling icon embed for windows executable
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 09eb6bd..9e670c6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,13 +1,26 @@
AUTOMAKE_OPTIONS = subdir-objects
-EXTRA_DIST = include unix windows
+EXTRA_DIST = include unix windows
+
+bin_PROGRAMS = terminal-media-launcher
+terminal_media_launcher_SOURCES = cache.c draw.c read_cfg.c group.c entry.c $(PLATFORM)/cache.c $(PLATFORM)/draw.c $(PLATFORM)/read_cfg.c
+terminal_media_launcher_LDADD = @CURSES_LIBS@
+terminal_media_launcher_CPPFLAGS = @CURSES_CFLAGS@
if WINDOWS
PLATFORM=windows
+
+# Embed icon
+if EMBED_ICON
+
+terminal_media_launcher_SOURCES += icon/$(PACKAGE_NAME).rc icon/$(PACKAGE_NAME).ico
+terminal_media_launcher_LDADD += icon/$(PACKAGE_NAME).res
+BUILT_SOURCES = icon/$(PACKAGE_NAME).res
+CLEANFILES = icon/$(PACKAGE_NAME).res
+
+icon/$(PACKAGE_NAME).res: icon/$(PACKAGE_NAME).ico icon/$(PACKAGE_NAME).rc
+ windres icon/$(PACKAGE_NAME).rc -O coff -o $@
+
+endif
else
PLATFORM=unix
endif
-
-bin_PROGRAMS = terminal-media-launcher
-terminal_media_launcher_SOURCES = cache.c draw.c read_cfg.c group.c entry.c $(PLATFORM)/cache.c $(PLATFORM)/draw.c $(PLATFORM)/read_cfg.c
-terminal_media_launcher_LDADD = @CURSES_LIBS@
-terminal_media_launcher_CPPFLAGS = @CURSES_CFLAGS@