summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-01-03 16:44:36 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-01-03 16:55:26 -0500
commit9326d96a149c71358faf032b709c047a79d7e13b (patch)
tree4b8368a3f0a4c945f732dae173c01f497806a49c /tests
parentb003b93dfeee53c349df7e47f820c5b3bbfbf904 (diff)
downloadgdk-pixbuf-9326d96a149c71358faf032b709c047a79d7e13b.tar.gz
Skip resource tests with glib subprojectmacos-ci
It doesn't work.
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build84
1 files changed, 46 insertions, 38 deletions
diff --git a/tests/meson.build b/tests/meson.build
index ab7ff1eee..9cac916ab 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,45 +1,53 @@
# Resources contain PNG and BMP files, so we need these two loaders
# enabled in order to build them
if enabled_loaders.contains('png')
- # Resources; we cannot use gnome.compile_resources() here, because we need to
- # override the environment in order to use the utilities we just built instead
- # of the system ones
- resources_c = custom_target('resources.c',
- input: 'resources.gresource.xml',
- output: 'resources.c',
- command: [
- gen_resources,
- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
- '--loaders=@0@'.format(loaders_cache.full_path()),
- '--sourcedir=@0@'.format(meson.current_source_dir()),
- '--source',
- '@INPUT@',
- '@OUTPUT@',
- ],
- depends: [
- gdk_pixbuf_pixdata,
- loaders_cache,
- ],
- )
+ if glib_dep.type_name() == 'internal'
+ # The gen_resources script does not work if we use glib as a subproject,
+ # since it won't find glib-compile-resources in the path
+ resources_c = []
+ resources_h = []
+ no_resources = true
+ else
+ # Resources; we cannot use gnome.compile_resources() here, because we need to
+ # override the environment in order to use the utilities we just built instead
+ # of the system ones
+ resources_c = custom_target('resources.c',
+ input: 'resources.gresource.xml',
+ output: 'resources.c',
+ command: [
+ gen_resources,
+ '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
+ '--loaders=@0@'.format(loaders_cache.full_path()),
+ '--sourcedir=@0@'.format(meson.current_source_dir()),
+ '--source',
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ depends: [
+ gdk_pixbuf_pixdata,
+ loaders_cache,
+ ],
+ )
- resources_h = custom_target('resources.h',
- input: 'resources.gresource.xml',
- output: 'resources.h',
- command: [
- gen_resources,
- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
- '--loaders=@0@'.format(loaders_cache.full_path()),
- '--sourcedir=@0@'.format(meson.current_source_dir()),
- '--header',
- '@INPUT@',
- '@OUTPUT@',
- ],
- depends: [
- gdk_pixbuf_pixdata,
- loaders_cache,
- ],
- )
- no_resources = false
+ resources_h = custom_target('resources.h',
+ input: 'resources.gresource.xml',
+ output: 'resources.h',
+ command: [
+ gen_resources,
+ '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
+ '--loaders=@0@'.format(loaders_cache.full_path()),
+ '--sourcedir=@0@'.format(meson.current_source_dir()),
+ '--header',
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ depends: [
+ gdk_pixbuf_pixdata,
+ loaders_cache,
+ ],
+ )
+ no_resources = false
+ endif
else
resources_c = []
resources_h = []