diff options
author | Emmanuele Bassi <ebassi@gmail.com> | 2018-12-04 20:42:03 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2018-12-04 20:42:03 +0000 |
commit | e191c75683e6e1db639a0e4213a169fdb3a805ea (patch) | |
tree | 6993c43941172a5ebd2cb7ecf7407451cc64076c | |
parent | 3d15c7cfb6da81bde79e1b74346833c889dc2bf0 (diff) | |
parent | c8a2098f756de94301fde16b9eec3dce566dc3ff (diff) | |
download | gdk-pixbuf-e191c75683e6e1db639a0e4213a169fdb3a805ea.tar.gz |
Merge branch 'cross-compile' into 'master'
Cross compile building
Closes #64
See merge request GNOME/gdk-pixbuf!20
-rw-r--r-- | gdk-pixbuf/meson.build | 34 | ||||
-rw-r--r-- | meson.build | 14 | ||||
-rw-r--r-- | meson_options.txt | 5 |
3 files changed, 35 insertions, 18 deletions
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build index 166d23140..430823028 100644 --- a/gdk-pixbuf/meson.build +++ b/gdk-pixbuf/meson.build @@ -125,6 +125,7 @@ foreach l: loaders mod = static_library('staticpixbufloader-@0@'.format(name), sources, + gdkpixbuf_enum_h, dependencies: loaders_deps + gdk_pixbuf_deps, include_directories: [ root_inc, gdk_pixbuf_inc ], c_args: common_cflags + gdk_pixbuf_cflags + cflags + cflag_for_included_loader) @@ -149,6 +150,7 @@ if native_windows_loaders mod = static_library('staticpixbufloader-gdiplus', win_loader_sources, + gdkpixbuf_enum_h, dependencies: loaders_deps + gdk_pixbuf_deps, include_directories: [ root_inc, gdk_pixbuf_inc ], c_args: common_cflags + gdk_pixbuf_cflags + cflag_for_included_loader) @@ -253,6 +255,7 @@ foreach l: loaders if cond and not (builtin_loaders.contains(name) or builtin_all_loaders) mod = shared_module('pixbufloader-@0@'.format(name), sources, + gdkpixbuf_enum_h, dependencies: loaders_deps + gdk_pixbuf_deps + [ gdkpixbuf_dep ], include_directories: [ root_inc, gdk_pixbuf_inc ], c_args: common_cflags + gdk_pixbuf_cflags + cflags, @@ -274,6 +277,7 @@ if native_windows_loaders mod = shared_module('pixbufloader-gdip-@0@'.format(loader), loader_sources, + gdkpixbuf_enum_h, dependencies: loaders_deps + gdk_pixbuf_deps + [ gdkpixbuf_dep ], include_directories: [ root_inc, gdk_pixbuf_inc ], c_args: common_cflags + gdk_pixbuf_cflags + cflags, @@ -296,6 +300,7 @@ foreach bin: gdkpixbuf_bin bin_source = bin.get(1, bin_name + '.c') bin = executable(bin_name, bin_source, + gdkpixbuf_enum_h, dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ], include_directories: [ root_inc, gdk_pixbuf_inc ], c_args: common_cflags + gdk_pixbuf_cflags, @@ -305,18 +310,23 @@ foreach bin: gdkpixbuf_bin set_variable(bin_name.underscorify(), bin) endforeach -# The 'loaders.cache' used for testing, so we don't accidentally -# load the installed cache; we always build it by default -loaders_cache = custom_target('loaders.cache', - output: 'loaders.cache', - capture: true, - command: [ - gdk_pixbuf_query_loaders, - dynamic_loaders, - ], - depends: dynamic_loaders_dep, - build_by_default: true) -loaders_dep = declare_dependency(sources: [ loaders_cache ]) +if not meson.is_cross_build() + # The 'loaders.cache' used for testing, so we don't accidentally + # load the installed cache; we always build it by default + loaders_cache = custom_target('loaders.cache', + output: 'loaders.cache', + capture: true, + command: [ + gdk_pixbuf_query_loaders, + dynamic_loaders, + ], + depends: dynamic_loaders_dep, + build_by_default: true) + loaders_dep = declare_dependency(sources: [ loaders_cache ]) +else + loaders_cache = [] + loaders_dep = declare_dependency() +endif pkgconfig = import('pkgconfig') pkgconfig.generate( diff --git a/meson.build b/meson.build index 96e72de84..d70ccf8d0 100644 --- a/meson.build +++ b/meson.build @@ -190,11 +190,11 @@ gmodule_dep = dependency('gmodule-no-export-2.0') gio_dep = dependency('gio-2.0') # On non-Windows/macOS systems we always required shared-mime-info and GIO -if host_system != 'windows' and host_system != 'darwin' - shared_mime_dep = dependency('shared-mime-info') +# shared_mime_dep = [] +shared_mime_dep = [] +if get_option('gio_sniffing') and host_system != 'windows' and host_system != 'darwin' + shared_mime_dep += dependency('shared-mime-info') gdk_pixbuf_conf.set('GDK_PIXBUF_USE_GIO_MIME', 1) -else - shared_mime_dep = [] endif # Check if medialib is available @@ -397,8 +397,10 @@ endif # i18n subdir('po') -subdir('tests') -subdir('thumbnailer') +if not meson.is_cross_build() + subdir('tests') + subdir('thumbnailer') +endif # Documentation subdir('docs') diff --git a/meson_options.txt b/meson_options.txt index 9f6b6505e..a7c33a869 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -46,3 +46,8 @@ option('installed_tests', description: 'Install the test suite', type: 'boolean', value: true) +option('gio_sniffing', + description: 'Perform file type detection using GIO (Unused on MacOS and Windows)', + type: 'boolean', + value: true) + |