summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-05-24 16:46:18 +0000
committerMatthias Clasen <mclasen@redhat.com>2022-05-24 16:46:18 +0000
commit36fbbfc5c780bf67b2a2acabc1f4c8011f73a4a0 (patch)
tree6c3382d721862b6176ded315552abd395d748dc1
parent9bfc89e23dd24006eb5fa19d642ff379b2b965da (diff)
parent802bf4199911c811938b0454a876089bafa97dba (diff)
downloadgtk+-36fbbfc5c780bf67b2a2acabc1f4c8011f73a4a0.tar.gz
Merge branch 'pkgconfig' into 'main'
Meson: Simplify pkgconfig file generator See merge request GNOME/gtk!4756
-rw-r--r--meson.build47
1 files changed, 14 insertions, 33 deletions
diff --git a/meson.build b/meson.build
index d78bbc1cd2..f46236dadd 100644
--- a/meson.build
+++ b/meson.build
@@ -471,9 +471,6 @@ if not os_win32
endif
endif
-
-pc_gdk_extra_libs = []
-
cairo_backends = []
foreach backend: [ ['cairo-xlib', cairo_req, x11_enabled],
['cairo-win32', cairo_req, win32_enabled],
@@ -604,26 +601,14 @@ if x11_enabled
cdata.set('HAVE_RANDR15', xrandr15_dep.found())
endif
-if broadway_enabled
- pc_gdk_extra_libs += ['-lz']
-endif
-
-if macos_enabled
- pc_gdk_extra_libs += ['-framework Cocoa', '-framework Carbon']
-endif
-
extra_demo_ldflags = []
if win32_enabled
- pc_gdk_extra_libs += ['-lgdi32', '-limm32', '-lshell32', '-lole32']
if cc.get_id() == 'msvc'
# Since the demo programs are now built as pure GUI programs, we
# need to pass in /entry:mainCRTStartup so that they will properly
# link on Visual Studio builds
extra_demo_ldflags = ['/entry:mainCRTStartup']
- else
- pc_gdk_extra_libs += ['-Wl,-luuid']
endif
- pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32', '-lhid']
# Check whether libepoxy is built with EGL support on Windows
endif
@@ -841,16 +826,7 @@ gsk_private_packages = [] # all already in gdk_private_packages
pangoft2_pkgs = (wayland_enabled or x11_enabled) ? ['pangoft2'] : []
gtk_private_packages = pangoft2_pkgs
-gdk_extra_libs = pc_gdk_extra_libs
-gsk_extra_libs = []
-gtk_extra_libs = []
-
-gdk_extra_cflags = []
-gsk_extra_cflags = []
-gtk_extra_cflags = []
-
-pkgs = [ 'gtk4' ]
-
+pkgs = []
pkg_targets = []
display_backends = []
foreach backend: [ 'broadway', 'macos', 'wayland', 'win32', 'x11', ]
@@ -867,18 +843,23 @@ common_pc_variables = [
'gtk_host=@0@-@1@'.format(host_machine.cpu_family(), host_machine.system()), # FIXME
]
+pkg_config.generate(libgtk,
+ filebase: 'gtk4',
+ unescaped_variables: common_pc_variables,
+ name: 'GTK',
+ description: 'GTK Graphical UI Library',
+ requires: gdk_packages + gsk_packages + gtk_packages,
+ subdirs: ['gtk-@0@'.format(gtk_api_version)],
+)
+meson.override_dependency('gtk4', libgtk_dep)
+
foreach pkg: pkgs
pkg_config.generate(
filebase: pkg,
unescaped_variables: common_pc_variables,
name: 'GTK',
description: 'GTK Graphical UI Library',
- requires: gdk_packages + gsk_packages + gtk_packages,
- requires_private: gdk_private_packages + gsk_private_packages + gtk_private_packages,
- libraries: ['-L${libdir}', '-lgtk-4'],
- libraries_private: gdk_extra_libs + gsk_extra_libs + gtk_extra_libs,
- subdirs: ['gtk-@0@'.format(gtk_api_version)],
- extra_cflags: gdk_extra_cflags + gsk_extra_cflags + gtk_extra_cflags,
+ requires: 'gtk4',
)
meson.override_dependency(pkg, libgtk_dep)
endforeach
@@ -889,10 +870,10 @@ if os_unix
unescaped_variables: common_pc_variables,
name: 'GTK',
description: 'GTK Unix print support',
- requires: ['gtk4'] + gtk_packages,
- libraries: [],
+ requires: 'gtk4',
subdirs: ['gtk-@0@/unix-print'.format(gtk_api_version)],
)
+ meson.override_dependency('gtk4-unix-print', libgtk_dep)
endif
subdir('po')