[gtk/wip/chergert/quartz4u] make things build with minimal brew usage
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/quartz4u] make things build with minimal brew usage
- Date: Tue, 28 Apr 2020 23:02:22 +0000 (UTC)
commit ca2afe1744822fd669b423fdd88b164d8f05f57e
Author: Christian Hergert <chergert redhat com>
Date: Tue Apr 28 16:01:35 2020 -0700
make things build with minimal brew usage
gdk/macos/meson.build | 25 +++++++++++++++----------
gdk/meson.build | 11 ++++++-----
gtk/meson.build | 8 +++++++-
meson.build | 5 -----
4 files changed, 28 insertions(+), 21 deletions(-)
---
diff --git a/gdk/macos/meson.build b/gdk/macos/meson.build
index 292b484f6e..888fdbdbbb 100644
--- a/gdk/macos/meson.build
+++ b/gdk/macos/meson.build
@@ -25,17 +25,22 @@ gdk_macos_public_headers = files([
install_headers(gdk_macos_public_headers, 'gdkmacos.h', subdir: 'gtk-4.0/gdk/macos/')
+gdk_macos_frameworks = [
+ 'AppKit',
+ 'Carbon',
+ 'CoreServices',
+]
+
gdk_macos_deps = [
+ dependency('appleframeworks', modules: gdk_macos_frameworks)
]
+libgdk_c_args += ['-xobjective-c']
+
libgdk_macos = static_library('gdk-macos',
- gdk_macos_sources, gdkconfig, gdkenum_h,
- include_directories: [ confinc, gdkinc, ],
- c_args: [
- '-DGTK_COMPILATION',
- '-DG_LOG_DOMAIN="Gdk"',
- '-xobjective-c',
- ] + common_cflags,
- link_args: common_ldflags,
- link_with: [],
- dependencies: [ gdk_deps, gdk_macos_deps])
+ gdk_macos_sources, gdkconfig, gdkenum_h,
+ include_directories: [ confinc, gdkinc, ],
+ c_args: libgdk_c_args + common_cflags,
+ link_args: common_ldflags,
+ link_with: [],
+ dependencies: gdk_deps + gdk_macos_deps)
diff --git a/gdk/meson.build b/gdk/meson.build
index 5835c0fbbf..eebc9b2a97 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -217,6 +217,11 @@ if wayland_enabled or broadway_enabled
endif
endif
+libgdk_c_args = [
+ '-DGTK_COMPILATION',
+ '-DG_LOG_DOMAIN="Gdk"',
+]
+
gdk_backends = []
gdk_backends_gen_headers = [] # non-public generated headers
foreach backend : ['broadway', 'quartz', 'wayland', 'win32', 'x11', 'macos']
@@ -236,16 +241,12 @@ if gdk_backends.length() == 0
error('No backends enabled')
endif
-# FIXME: might have to add '-xobjective-c' to c_args for quartz backend?
libgdk = static_library('gdk',
sources: [gdk_sources, gdk_backends_gen_headers, gdkconfig],
dependencies: gdk_deps + [libgtk_css_dep],
link_with: [libgtk_css, ],
include_directories: [confinc, gdkx11_inc, wlinc],
- c_args: [
- '-DGTK_COMPILATION',
- '-DG_LOG_DOMAIN="Gdk"',
- ] + common_cflags,
+ c_args: libgdk_c_args + common_cflags,
link_whole: gdk_backends,
link_args: common_ldflags)
diff --git a/gtk/meson.build b/gtk/meson.build
index e78375df7e..3b3e0bbd02 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -983,6 +983,12 @@ if cc.has_header('langinfo.h')
endforeach
endif
+# Maintain compatibility with autotools
+gtk_ldflags = []
+if os_darwin
+ gtk_ldflags += [ '-compatibility_version 1', '-current_version 1.0', ]
+endif
+
# Library
libgtk = library('gtk-4',
soversion: gtk_soversion,
@@ -992,7 +998,7 @@ libgtk = library('gtk-4',
include_directories: [confinc, gdkinc, gskinc, gtkinc],
dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
link_with: [libgtk_css, libgdk, libgsk, ],
- link_args: common_ldflags,
+ link_args: common_ldflags + gtk_ldflags,
install: true)
gtk_dep_sources = [gtkversion, gtktypebuiltins_h]
diff --git a/meson.build b/meson.build
index 1989647427..42074ea6c8 100644
--- a/meson.build
+++ b/meson.build
@@ -321,11 +321,6 @@ if os_unix and not os_darwin
endforeach
endif
-# Maintain compatibility with autotools
-if os_darwin
- common_ldflags += [ '-compatibility_version 1', '-current_version 1.0', ]
-endif
-
confinc = include_directories('.')
gdkinc = include_directories('gdk')
gskinc = include_directories('gsk')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]