aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2023-09-12 19:31:10 +0200
committerMihai Moldovan <ionic@ionic.de>2023-09-12 19:32:30 +0200
commitdf8e0f9bbe9eb3dc81194bcefc6339bcec6d8b94 (patch)
treed0930fe909f630e433257df76fb36f8a1ddbcfcb
parent60a55ebbbd2e5656c436e2e469a0d627bb7ee13a (diff)
downloadarctica-greeter-df8e0f9bbe9eb3dc81194bcefc6339bcec6d8b94.tar.gz
arctica-greeter-df8e0f9bbe9eb3dc81194bcefc6339bcec6d8b94.tar.bz2
arctica-greeter-df8e0f9bbe9eb3dc81194bcefc6339bcec6d8b94.zip
{src,tests}/Makefile.am: implement proper GTK+ 3/GTK 4 switching support.
Fixes: https://github.com/ArcticaProject/arctica-greeter/issues/56
-rw-r--r--src/Makefile.am15
-rw-r--r--tests/Makefile.am15
2 files changed, 30 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 4c10950..015bd17 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,6 +44,7 @@ logo_generator_SOURCES = logo-generator.vala
arctica_greeter_CFLAGS = \
$(ARCTICA_GREETER_CFLAGS) \
+ $(GTK_CFLAGS) \
-w \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
-DLOCALEDIR=\"$(localedir)\" \
@@ -58,8 +59,21 @@ arctica_greeter_VALAFLAGS = \
$(AM_VALAFLAGS) \
--debug \
--pkg posix \
+ $(NULL)
+
+if HAVE_GTK4
+arctica_greeter_VALAFLAGS += \
+ --pkg gtk4 \
+ --pkg gtk4-x11 \
+ $(NULL)
+else
+arctica_greeter_VALAFLAGS += \
--pkg gtk+-3.0 \
--pkg gdk-x11-3.0 \
+ $(NULL)
+endif
+
+arctica_greeter_VALAFLAGS += \
--pkg gio-unix-2.0 \
--pkg x11 \
--pkg liblightdm-gobject-1 \
@@ -72,6 +86,7 @@ logo_generator_VALAFLAGS = $(arctica_greeter_VALAFLAGS)
arctica_greeter_LDADD = \
$(ARCTICA_GREETER_LIBS) \
+ $(GTK_LIBS) \
-lm
logo_generator_LDADD = $(arctica_greeter_LDADD)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d2d0d32..f91abb4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -41,6 +41,7 @@ arctica_greeter_test_SOURCES = \
arctica_greeter_test_CFLAGS = \
$(ARCTICA_GREETER_CFLAGS) \
+ $(GTK_CFLAGS) \
-w \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
-DLOCALEDIR=\""$(localedir)"\" \
@@ -52,8 +53,21 @@ arctica_greeter_test_CFLAGS = \
arctica_greeter_test_VALAFLAGS = \
--debug \
--pkg posix \
+ $(NULL)
+
+if HAVE_GTK4
+arctica_greeter_test_VALAFLAGS += \
+ --pkg gtk4 \
+ --pkg gtk4-x11 \
+ $(NULL)
+else
+arctica_greeter_test_VALAFLAGS += \
--pkg gtk+-3.0 \
--pkg gdk-x11-3.0 \
+ $(NULL)
+endif
+
+arctica_greeter_test_VALAFLAGS += \
--pkg gio-unix-2.0 \
--pkg x11 \
--pkg liblightdm-gobject-1 \
@@ -64,6 +78,7 @@ arctica_greeter_test_VALAFLAGS = \
arctica_greeter_test_LDADD = \
$(ARCTICA_GREETER_LIBS) \
+ $(GTK_LIBS) \
-lm
CLEANFILES = \