pixman: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 15 22:47:33 UTC 2023
configure.ac | 2 +-
demos/Makefile.am | 6 +++---
demos/conical-test.c | 2 +-
demos/dither.c | 4 ++--
demos/gtk-utils.c | 6 ++++--
demos/linear-gradient.c | 2 +-
demos/meson.build | 4 ++--
demos/radial-test.c | 2 +-
demos/scale.c | 2 +-
demos/tri-test.c | 2 +-
meson.build | 13 ++++++++++---
meson_options.txt | 7 ++++++-
pixman/make-srgb.pl | 2 +-
pixman/meson.build | 2 +-
pixman/pixman-access.c | 2 +-
pixman/pixman-arm-neon.c | 2 +-
pixman/pixman-arm-simd.c | 2 +-
pixman/pixman-arm.c | 2 +-
pixman/pixman-bits-image.c | 2 +-
pixman/pixman-combine-float.c | 2 +-
pixman/pixman-combine32.c | 2 +-
pixman/pixman-conical-gradient.c | 2 +-
pixman/pixman-edge.c | 2 +-
pixman/pixman-fast-path.c | 2 +-
pixman/pixman-filter.c | 2 +-
pixman/pixman-general.c | 2 +-
pixman/pixman-glyph.c | 2 +-
pixman/pixman-gradient-walker.c | 2 +-
pixman/pixman-image.c | 2 +-
pixman/pixman-implementation.c | 2 +-
pixman/pixman-linear-gradient.c | 2 +-
pixman/pixman-matrix.c | 2 +-
pixman/pixman-mips-dspr2.c | 2 +-
pixman/pixman-mips.c | 2 +-
pixman/pixman-mmx.c | 2 +-
pixman/pixman-noop.c | 2 +-
pixman/pixman-ppc.c | 2 +-
pixman/pixman-radial-gradient.c | 2 +-
pixman/pixman-region16.c | 2 +-
pixman/pixman-region32.c | 2 +-
pixman/pixman-solid-fill.c | 2 +-
pixman/pixman-sse2.c | 2 +-
pixman/pixman-ssse3.c | 2 +-
pixman/pixman-timer.c | 2 +-
pixman/pixman-trap.c | 2 +-
pixman/pixman-utils.c | 2 +-
pixman/pixman-vmx.c | 2 +-
pixman/pixman-x86.c | 2 +-
pixman/pixman.c | 2 +-
test/Makefile.am | 3 ++-
test/Makefile.sources | 8 ++++----
test/fence-image-self-test.c | 2 +-
test/meson.build | 13 +++----------
test/utils/meson.build | 31 +++++++++++++++++++++++++++++++
test/utils/utils-prng.h | 2 +-
test/utils/utils.h | 2 +-
56 files changed, 113 insertions(+), 74 deletions(-)
New commits:
commit ee145e53d1c1175a7af873c120eb2958cd38982e
Author: Emanuel Schmidt <eschmidt216 at gmail.com>
Date: Tue Feb 14 22:00:47 2023 +0100
Changed name of the config-header to "pixman-config.h"
diff --git a/configure.ac b/configure.ac
index 9de9e22..b81d898 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ AM_INIT_AUTOMAKE([foreign dist-xz])
# Suppress verbose compile lines
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-AC_CONFIG_HEADERS(config.h)
+AC_CONFIG_HEADERS(pixman-config.h)
AC_CANONICAL_HOST
diff --git a/demos/dither.c b/demos/dither.c
index 63ba248..a6a157a 100644
--- a/demos/dither.c
+++ b/demos/dither.c
@@ -23,7 +23,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include "pixman-config.h"
#endif
#include <math.h>
#include <gtk/gtk.h>
diff --git a/demos/gtk-utils.c b/demos/gtk-utils.c
index cac8a8d..dc872a9 100644
--- a/demos/gtk-utils.c
+++ b/demos/gtk-utils.c
@@ -1,5 +1,7 @@
#include <gtk/gtk.h>
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+#include <pixman-config.h>
+#endif
#include "utils.h"
#include "gtk-utils.h"
diff --git a/demos/scale.c b/demos/scale.c
index 7459a5c..fa2a28a 100644
--- a/demos/scale.c
+++ b/demos/scale.c
@@ -24,7 +24,7 @@
* Author: Soren Sandmann <soren.sandmann at gmail.com>
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include "pixman-config.h"
#endif
#include <math.h>
#include <gtk/gtk.h>
diff --git a/pixman/make-srgb.pl b/pixman/make-srgb.pl
index cdaa80b..8bba160 100644
--- a/pixman/make-srgb.pl
+++ b/pixman/make-srgb.pl
@@ -73,7 +73,7 @@ print <<"PROLOG";
#include <stdint.h>
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/meson.build b/pixman/meson.build
index 652cda3..5dce870 100644
--- a/pixman/meson.build
+++ b/pixman/meson.build
@@ -20,7 +20,7 @@
config_h = configure_file(
configuration : config,
- output : 'config.h'
+ output : 'pixman-config.h'
)
version_h = configure_file(
diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index 54b0f31..892e70b 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index 62c9442..103f1c2 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -27,7 +27,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <string.h>
diff --git a/pixman/pixman-arm-simd.c b/pixman/pixman-arm-simd.c
index f0d1454..40f3a97 100644
--- a/pixman/pixman-arm-simd.c
+++ b/pixman/pixman-arm-simd.c
@@ -24,7 +24,7 @@
*
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-arm.c b/pixman/pixman-arm.c
index a164b7f..288172b 100644
--- a/pixman/pixman-arm.c
+++ b/pixman/pixman-arm.c
@@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index 6f65420..1698d73 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -27,7 +27,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/pixman/pixman-combine-float.c b/pixman/pixman-combine-float.c
index f5145bc..27392d6 100644
--- a/pixman/pixman-combine-float.c
+++ b/pixman/pixman-combine-float.c
@@ -26,7 +26,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <math.h>
diff --git a/pixman/pixman-combine32.c b/pixman/pixman-combine32.c
index 4a89384..de51f64 100644
--- a/pixman/pixman-combine32.c
+++ b/pixman/pixman-combine32.c
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <math.h>
diff --git a/pixman/pixman-conical-gradient.c b/pixman/pixman-conical-gradient.c
index a39e20c..37dfffd 100644
--- a/pixman/pixman-conical-gradient.c
+++ b/pixman/pixman-conical-gradient.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
diff --git a/pixman/pixman-edge.c b/pixman/pixman-edge.c
index ad6dfc4..c324cd3 100644
--- a/pixman/pixman-edge.c
+++ b/pixman/pixman-edge.c
@@ -21,7 +21,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <string.h>
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index fa5ea03..4579fce 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -24,7 +24,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <string.h>
#include <stdlib.h>
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index fa94532..33327df 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -29,7 +29,7 @@
#include <math.h>
#include <assert.h>
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
index 7e5a0d0..b4450cb 100644
--- a/pixman/pixman-general.c
+++ b/pixman/pixman-general.c
@@ -26,7 +26,7 @@
* SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
#include <string.h>
diff --git a/pixman/pixman-glyph.c b/pixman/pixman-glyph.c
index 96a349a..dc90411 100644
--- a/pixman/pixman-glyph.c
+++ b/pixman/pixman-glyph.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-gradient-walker.c b/pixman/pixman-gradient-walker.c
index fb7f401..b31d5ad 100644
--- a/pixman/pixman-gradient-walker.c
+++ b/pixman/pixman-gradient-walker.c
@@ -24,7 +24,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index db29ff5..46b201f 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -21,7 +21,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c
index 5a2cbfe..69fa70b 100644
--- a/pixman/pixman-implementation.c
+++ b/pixman/pixman-implementation.c
@@ -22,7 +22,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
#include "pixman-private.h"
diff --git a/pixman/pixman-linear-gradient.c b/pixman/pixman-linear-gradient.c
index 3f52850..014b69c 100644
--- a/pixman/pixman-linear-gradient.c
+++ b/pixman/pixman-linear-gradient.c
@@ -26,7 +26,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
#include "pixman-private.h"
diff --git a/pixman/pixman-matrix.c b/pixman/pixman-matrix.c
index 81b6e61..da5209c 100644
--- a/pixman/pixman-matrix.c
+++ b/pixman/pixman-matrix.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <math.h>
diff --git a/pixman/pixman-mips-dspr2.c b/pixman/pixman-mips-dspr2.c
index 87969ae..c43eb1e 100644
--- a/pixman/pixman-mips-dspr2.c
+++ b/pixman/pixman-mips-dspr2.c
@@ -30,7 +30,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-mips.c b/pixman/pixman-mips.c
index 3048813..7479a08 100644
--- a/pixman/pixman-mips.c
+++ b/pixman/pixman-mips.c
@@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index d7cf265..f7f5560 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -30,7 +30,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#if defined USE_X86_MMX || defined USE_ARM_IWMMXT || defined USE_LOONGSON_MMI
diff --git a/pixman/pixman-noop.c b/pixman/pixman-noop.c
index e598904..e43199b 100644
--- a/pixman/pixman-noop.c
+++ b/pixman/pixman-noop.c
@@ -22,7 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <string.h>
#include <stdlib.h>
diff --git a/pixman/pixman-ppc.c b/pixman/pixman-ppc.c
index 4d5506d..926eb44 100644
--- a/pixman/pixman-ppc.c
+++ b/pixman/pixman-ppc.c
@@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-radial-gradient.c b/pixman/pixman-radial-gradient.c
index e8e99c9..38e1052 100644
--- a/pixman/pixman-radial-gradient.c
+++ b/pixman/pixman-radial-gradient.c
@@ -28,7 +28,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
#include <math.h>
diff --git a/pixman/pixman-region16.c b/pixman/pixman-region16.c
index d88d338..da4719e 100644
--- a/pixman/pixman-region16.c
+++ b/pixman/pixman-region16.c
@@ -23,7 +23,7 @@
* Author: Soren Sandmann <sandmann at redhat.com>
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#undef PIXMAN_DISABLE_DEPRECATED
diff --git a/pixman/pixman-region32.c b/pixman/pixman-region32.c
index abd6b1a..68b456b 100644
--- a/pixman/pixman-region32.c
+++ b/pixman/pixman-region32.c
@@ -23,7 +23,7 @@
* Author: Soren Sandmann <sandmann at redhat.com>
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-solid-fill.c b/pixman/pixman-solid-fill.c
index 4694ebc..44f4de0 100644
--- a/pixman/pixman-solid-fill.c
+++ b/pixman/pixman-solid-fill.c
@@ -22,7 +22,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index ce4e75f..6082537 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -27,7 +27,7 @@
* Based on work by Owen Taylor and Søren Sandmann
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
/* PSHUFD is slow on a lot of old processors, and new processors have SSSE3 */
diff --git a/pixman/pixman-ssse3.c b/pixman/pixman-ssse3.c
index 680d6b9..0359895 100644
--- a/pixman/pixman-ssse3.c
+++ b/pixman/pixman-ssse3.c
@@ -24,7 +24,7 @@
* Author: Soren Sandmann (soren.sandmann at gmail.com)
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
diff --git a/pixman/pixman-timer.c b/pixman/pixman-timer.c
index f5ae18e..656d900 100644
--- a/pixman/pixman-timer.c
+++ b/pixman/pixman-timer.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c
index 7560405..0ec73dc 100644
--- a/pixman/pixman-trap.c
+++ b/pixman/pixman-trap.c
@@ -22,7 +22,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdio.h>
diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index 2c2dddd..8c57b0b 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -23,7 +23,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c
index 52de37e..1086b28 100644
--- a/pixman/pixman-vmx.c
+++ b/pixman/pixman-vmx.c
@@ -26,7 +26,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
#include "pixman-combine32.h"
diff --git a/pixman/pixman-x86.c b/pixman/pixman-x86.c
index 0130b7b..7f4d80e 100644
--- a/pixman/pixman-x86.c
+++ b/pixman/pixman-x86.c
@@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/pixman/pixman.c b/pixman/pixman.c
index 1a3cba0..17015a8 100644
--- a/pixman/pixman.c
+++ b/pixman/pixman.c
@@ -24,7 +24,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/test/fence-image-self-test.c b/test/fence-image-self-test.c
index c80b3cf..2eb82ce 100644
--- a/test/fence-image-self-test.c
+++ b/test/fence-image-self-test.c
@@ -23,7 +23,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "utils.h"
diff --git a/test/utils/utils-prng.h b/test/utils/utils-prng.h
index f9ae8dd..3cc3fbe 100644
--- a/test/utils/utils-prng.h
+++ b/test/utils/utils-prng.h
@@ -72,7 +72,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/test/utils/utils.h b/test/utils/utils.h
index 701417f..d3e1ba4 100644
--- a/test/utils/utils.h
+++ b/test/utils/utils.h
@@ -1,5 +1,5 @@
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <assert.h>
commit eb998d7b6510b04f02259856c135a4083f8e6184
Author: Emanuel Schmidt <eschmidt216 at gmail.com>
Date: Wed Feb 1 19:31:13 2023 +0100
Separate meson build options for demos and tests
diff --git a/demos/Makefile.am b/demos/Makefile.am
index c58e359..f3ea0e4 100644
--- a/demos/Makefile.am
+++ b/demos/Makefile.am
@@ -12,10 +12,10 @@ AM_CFLAGS = $(OPENMP_CFLAGS)
AM_LDFLAGS = $(OPENMP_CFLAGS)
LDADD = $(top_builddir)/pixman/libpixman-1.la -lm $(GTK_LIBS) $(PNG_LIBS)
-AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(GTK_CFLAGS) $(PNG_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_srcdir)/test/utils -I$(top_builddir)/pixman $(GTK_CFLAGS) $(PNG_CFLAGS)
-GTK_UTILS = gtk-utils.c gtk-utils.h ../test/utils.c ../test/utils.h \
- ../test/utils-prng.c ../test/utils-prng.h
+GTK_UTILS = gtk-utils.c gtk-utils.h ../test/utils/utils.c ../test/utils/utils.h \
+ ../test/utils/utils-prng.c ../test/utils/utils-prng.h
DEMOS = \
clip-test \
diff --git a/demos/conical-test.c b/demos/conical-test.c
index 6b32430..5ff1be9 100644
--- a/demos/conical-test.c
+++ b/demos/conical-test.c
@@ -1,4 +1,4 @@
-#include "../test/utils.h"
+#include "utils.h"
#include "gtk-utils.h"
#define SIZE 128
diff --git a/demos/dither.c b/demos/dither.c
index 2ab8270..63ba248 100644
--- a/demos/dither.c
+++ b/demos/dither.c
@@ -28,7 +28,7 @@
#include <math.h>
#include <gtk/gtk.h>
#include <stdlib.h>
-#include "../test/utils.h"
+#include "utils.h"
#include "gtk-utils.h"
#define WIDTH 1024
diff --git a/demos/gtk-utils.c b/demos/gtk-utils.c
index b3a60ff..cac8a8d 100644
--- a/demos/gtk-utils.c
+++ b/demos/gtk-utils.c
@@ -1,6 +1,6 @@
#include <gtk/gtk.h>
#include <config.h>
-#include "../test/utils.h"
+#include "utils.h"
#include "gtk-utils.h"
pixman_image_t *
diff --git a/demos/linear-gradient.c b/demos/linear-gradient.c
index 46433a6..03807a6 100644
--- a/demos/linear-gradient.c
+++ b/demos/linear-gradient.c
@@ -1,4 +1,4 @@
-#include "../test/utils.h"
+#include "utils.h"
#include "gtk-utils.h"
#define WIDTH 1024
diff --git a/demos/meson.build b/demos/meson.build
index 3f9d306..c844e92 100644
--- a/demos/meson.build
+++ b/demos/meson.build
@@ -57,8 +57,8 @@ if dep_gtk.found()
d,
[d + '.c', config_h, version_h],
c_args : extra_demo_cflags,
- link_with : [libdemo, libtestutils],
- dependencies : [dep_glib, dep_gtk, dep_openmp, idep_pixman],
+ link_with : [libdemo],
+ dependencies : [idep_pixman, libtestutils_dep, dep_glib, dep_gtk, dep_openmp, dep_png],
)
endforeach
endif
diff --git a/demos/radial-test.c b/demos/radial-test.c
index 08a367c..52292eb 100644
--- a/demos/radial-test.c
+++ b/demos/radial-test.c
@@ -1,4 +1,4 @@
-#include "../test/utils.h"
+#include "utils.h"
#include "gtk-utils.h"
#define NUM_GRADIENTS 9
diff --git a/demos/tri-test.c b/demos/tri-test.c
index a71869a..9d213eb 100644
--- a/demos/tri-test.c
+++ b/demos/tri-test.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "../test/utils.h"
+#include "utils.h"
#include "gtk-utils.h"
int
diff --git a/meson.build b/meson.build
index 14de9aa..42dbe93 100644
--- a/meson.build
+++ b/meson.build
@@ -412,8 +412,8 @@ else
dep_openmp = null_dep
endif
-dep_gtk = dependency('gtk+-3.0', required : get_option('gtk'))
-dep_glib = dependency('glib-2.0', required : get_option('gtk'))
+dep_gtk = dependency('gtk+-3.0', required : get_option('gtk'), required: get_option('demos'))
+dep_glib = dependency('glib-2.0', required : get_option('gtk'), required: get_option('demos'))
dep_png = null_dep
if not get_option('libpng').disabled()
@@ -559,9 +559,16 @@ add_project_arguments('-DHAVE_CONFIG_H', language : ['c'])
subdir('pixman')
+if not get_option('tests').disabled() or not get_option('demos').disabled()
+ subdir(join_paths('test', 'utils'))
+endif
+
+if not get_option('demos').disabled()
+ subdir('demos')
+endif
+
if not get_option('tests').disabled()
subdir('test')
- subdir('demos')
endif
pkg = import('pkgconfig')
diff --git a/meson_options.txt b/meson_options.txt
index 99dbb4e..df10889 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -119,5 +119,10 @@ option(
option(
'tests',
type : 'feature',
- description : 'Build tests and demos'
+ description : 'Build tests'
+)
+option(
+ 'demos',
+ type : 'feature',
+ description : 'Build demos'
)
diff --git a/test/Makefile.am b/test/Makefile.am
index 6dbed88..6b0e753 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/test/Makefile.sources
AM_CFLAGS = $(OPENMP_CFLAGS) $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(OPENMP_CFLAGS) $(TESTPROGS_EXTRA_LDFLAGS) $(PTHREAD_LDFLAGS)
LDADD = libutils.la $(top_builddir)/pixman/libpixman-1.la -lm $(PNG_LIBS) $(PTHREAD_LIBS)
-AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(PNG_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_srcdir)/test/utils -I$(top_builddir)/pixman $(PNG_CFLAGS)
libutils_la_SOURCES = $(libutils_sources) $(libutils_headers)
@@ -14,4 +14,5 @@ TESTS = $(TESTPROGRAMS)
EXTRA_DIST = \
meson.build \
+ utils/meson.build \
$(NULL)
diff --git a/test/Makefile.sources b/test/Makefile.sources
index 0a56231..c9c6c4d 100644
--- a/test/Makefile.sources
+++ b/test/Makefile.sources
@@ -46,11 +46,11 @@ OTHERPROGRAMS = \
# Utility functions
libutils_sources = \
- utils.c \
- utils-prng.c \
+ utils/utils.c \
+ utils/utils-prng.c \
$(NULL)
libutils_headers = \
- utils.h \
- utils-prng.h \
+ utils/utils.h \
+ utils/utils-prng.h \
$(NULL)
diff --git a/test/meson.build b/test/meson.build
index 59a0d42..47dd33c 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -67,20 +67,13 @@ progs = [
'affine-bench',
]
-libtestutils = static_library(
- 'testutils',
- ['utils.c', 'utils-prng.c', config_h],
- dependencies : [dep_openmp, dep_m, dep_png, idep_pixman],
-)
-
foreach t : tests
test(
t,
executable(
t,
[t + '.c', config_h],
- link_with : libtestutils,
- dependencies : [dep_threads, dep_openmp, idep_pixman],
+ dependencies : [idep_pixman, libtestutils_dep, dep_threads, dep_openmp, dep_png],
),
timeout : 120,
is_parallel : true,
@@ -91,7 +84,7 @@ foreach p : progs
executable(
p,
p + '.c',
- link_with : libtestutils,
- dependencies : [dep_openmp, idep_pixman],
+ dependencies : [idep_pixman, libtestutils_dep, dep_openmp],
)
endforeach
+
diff --git a/test/utils/meson.build b/test/utils/meson.build
new file mode 100644
index 0000000..9a6e820
--- /dev/null
+++ b/test/utils/meson.build
@@ -0,0 +1,31 @@
+# Copyright © 2018 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+libtestutils = static_library(
+ 'testutils',
+ ['utils.c', 'utils-prng.c', config_h],
+ dependencies : [idep_pixman, dep_openmp, dep_m, dep_png],
+)
+
+libtestutils_dep = declare_dependency(
+ link_with: libtestutils,
+ include_directories: include_directories('.'),
+)
+
diff --git a/test/utils-prng.c b/test/utils/utils-prng.c
similarity index 100%
rename from test/utils-prng.c
rename to test/utils/utils-prng.c
diff --git a/test/utils-prng.h b/test/utils/utils-prng.h
similarity index 100%
rename from test/utils-prng.h
rename to test/utils/utils-prng.h
diff --git a/test/utils.c b/test/utils/utils.c
similarity index 100%
rename from test/utils.c
rename to test/utils/utils.c
diff --git a/test/utils.h b/test/utils/utils.h
similarity index 100%
rename from test/utils.h
rename to test/utils/utils.h
More information about the xorg-commit
mailing list