diff options
-rw-r--r-- | gdk-pixbuf/meson.build | 8 | ||||
-rw-r--r-- | meson.build | 20 |
2 files changed, 22 insertions, 6 deletions
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build index 8c944ba71..6e035905a 100644 --- a/gdk-pixbuf/meson.build +++ b/gdk-pixbuf/meson.build @@ -110,7 +110,7 @@ endif # Check if we need to build loaders as built-in functionality included_loaders_cflags = [] -included_loaders_deps = [] +included_loaders_objs = [] foreach l: loaders name = l[0] @@ -129,7 +129,7 @@ foreach l: loaders include_directories: [ root_inc, gdk_pixbuf_inc ], c_args: common_cflags + gdk_pixbuf_cflags + cflags + cflag_for_included_loader) - included_loaders_deps += declare_dependency(link_with: mod) + included_loaders_objs += mod.extract_all_objects() endif endforeach @@ -154,7 +154,7 @@ if native_windows_loaders include_directories: [ root_inc, gdk_pixbuf_inc ], c_args: common_cflags + gdk_pixbuf_cflags + cflag_for_included_loader) - included_loaders_deps += declare_dependency(link_with: mod) + included_loaders_objs += mod.extract_all_objects() endif endif @@ -167,6 +167,7 @@ gdkpixbuf = library('gdk_pixbuf-2.0', gdkpixbuf_marshals, gdkpixdata_sources, ], + objects: included_loaders_objs, soversion: soversion, version: libversion, c_args: common_cflags + gdk_pixbuf_cflags + included_loaders_cflags, @@ -177,7 +178,6 @@ gdkpixbuf = library('gdk_pixbuf-2.0', ], dependencies: [ gdk_pixbuf_deps, - included_loaders_deps, ], install: true) diff --git a/meson.build b/meson.build index 45d878c07..7c23b46cd 100644 --- a/meson.build +++ b/meson.build @@ -288,6 +288,9 @@ if get_option('png') loaders_deps += png_dep endif endif + if png_dep.found() and (builtin_loaders.contains('png') or builtin_all_loaders) + gdk_pixbuf_deps += png_dep + endif endif endif @@ -302,9 +305,13 @@ else endif if native_windows_loaders - loaders_deps += cc.find_library('gdiplus') - loaders_deps += cc.find_library('ole32') + gdip_lib = cc.find_library('gdiplus') + ole32_lib = cc.find_library('ole32') + loaders_deps += [gdip_lib, ole32_lib] enabled_loaders += 'gdiplus' + if builtin_loaders.contains('gdiplus') or builtin_all_loaders + gdk_pixbuf_deps += [gdip_lib, ole32_lib] + endif endif # Don't check and build the jpeg loader if native_windows_loaders is true @@ -323,6 +330,9 @@ if get_option('jpeg') and not native_windows_loaders gdk_pixbuf_conf.set('HAVE_PROGRESSIVE_JPEG', cc.has_function('jpeg_simple_progression', dependencies: jpeg_dep)) + if builtin_loaders.contains('jpeg') or builtin_all_loaders + gdk_pixbuf_deps += jpeg_dep + endif endif endif endif @@ -346,6 +356,9 @@ if get_option('tiff') and not native_windows_loaders if tiff_dep.found() enabled_loaders += 'tiff' loaders_deps += tiff_dep + if builtin_loaders.contains('tiff') or builtin_all_loaders + gdk_pixbuf_deps += tiff_dep + endif endif endif @@ -375,6 +388,9 @@ if get_option('jasper') if jasper_dep.found() and cc.has_function('jas_init', dependencies: jasper_dep) enabled_loaders += 'jasper' loaders_deps += jasper_dep + if builtin_loaders.contains('jasper') or builtin_all_loaders + gdk_pixbuf_deps += jasper_dep + endif endif endif endif |