summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorAnton <anton@picapica.im>2026-09-26 03:03:13 +0400
committerAnton <anton@picapica.im>2026-09-26 03:03:13 +0400
commit47cc7e0baaa6328540215c34eedacaf36fcc5d01 (patch)
tree3624002a1f451a4056268b5622844e52379d8b3a /Makefile.am
parent1f7c350a83d6a515919255dc72266fd4e143cd1d (diff)
downloadpica-pica-47cc7e0baaa6328540215c34eedacaf36fcc5d01.tar.gz
pica-pica-47cc7e0baaa6328540215c34eedacaf36fcc5d01.zip
windows build & installers, icons, manifests
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am44
1 files changed, 43 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index e0ed1cd..fa89256 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,6 +12,39 @@ EXTRA_DIST = iniparser/LICENSE \
pica-client/icons
#####################################
+# Windows resources. Each program gets the program icon and the application
+# manifest compiled into a linkable object by windres, which is then added to
+# its LDADD below. Only the Windows build has a use for these, but the suffix
+# itself is declared unconditionally so that make knows .rc is a source suffix
+# and not the name of a file.
+SUFFIXES = .rc
+
+if TARGET_WINDOWS
+
+# The icon lives in the source directory while the manifest is generated by
+# configure into the build directory, so both have to be on the include path
+# windres resolves the file names in the resource script against. The version
+# is handed to the VERSIONINFO resource on the command line instead of the
+# resource script being generated, in the two spellings the numeric and the
+# string fields need. The quotes around the string one are escaped twice on
+# purpose: windres passes its own command line to the preprocessor through a
+# shell, so one round of quoting is eaten there and one here.
+.rc.o:
+ $(WINDRES) -I $(srcdir)/windows -I windows \
+ -DPICA_WINDOWS_VERSION_COMMAS=$(PICA_WINDOWS_VERSION_COMMAS) \
+ -DPICA_WINDOWS_VERSION_STRING=\\\"$(VERSION)\\\" \
+ -i $< -o $@
+
+windows/pica-node.o: windows/pica-node.rc windows/picapica.ico \
+ windows/pica-node.exe.manifest
+
+windows/pica-client.o: windows/pica-client.rc windows/picapica.ico \
+ windows/pica-client.exe.manifest
+
+CLEANFILES += windows/pica-node.o windows/pica-client.o
+
+endif
+#####################################
if PICA_NODE
bin_PROGRAMS += pica-node
@@ -30,6 +63,11 @@ dist_man_MANS = pica-node.8 pica-node.conf.5
pica_node_CPPFLAGS = -DPICA_INSTALLPREFIX=\"$(prefix)\" -DPICA_SYSCONFDIR=\"$(sysconfdir)\" -DPICA_LOCALSTATEDIR=\"$(localstatedir)\"
pica_node_LDADD = $(PICA_NODE_LIBS)
+
+if TARGET_WINDOWS
+pica_node_LDADD += windows/pica-node.o
+endif
+
pkglocalstatedir = $(localstatedir)/pica-node
dist_pkglocalstate_DATA = nodelist.db
@@ -193,10 +231,14 @@ pica-client/mainwindow.cpp: ui_mainwindow.h
ui_%.h: pica-client/%.ui
$(UIC) $< -o $@
-
+
pica_client_pica_client_CPPFLAGS = -DPICA_INSTALLPREFIX=\"$(prefix)\" $(QT_DEPENDENCIES_CFLAGS) $(FFMPEG_CFLAGS) $(PLATFORM_DEPS_CFLAGS) $(WEBRTC_AUDIO_PROCESSING_CFLAGS)
pica_client_pica_client_LDADD = $(QT_DEPENDENCIES_LIBS) $(FFMPEG_LIBS) $(PLATFORM_DEPS_LIBS) $(WEBRTC_AUDIO_PROCESSING_LIBS)
+if TARGET_WINDOWS
+pica_client_pica_client_LDADD += windows/pica-client.o
+endif
+
# Listing PulseAudio sources and sinks in the settings dialog. The two
# native backend sources above are compiled unconditionally and are empty
# preprocessor-wise on the platforms they are not for, but libpulse is a