[glib] meson: add carbon and cocoa libs when building for OSX
- From: Nirbheek Chauhan <nirbheekc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] meson: add carbon and cocoa libs when building for OSX
- Date: Thu, 14 Dec 2017 10:52:03 +0000 (UTC)
commit 17bfc39ea7745d050fc36cdb233ac6b697971af8
Author: Havard Graff <havard graff gmail com>
Date: Mon Dec 11 12:32:57 2017 +1100
meson: add carbon and cocoa libs when building for OSX
https://bugzilla.gnome.org/show_bug.cgi?id=791460
glib/meson.build | 2 +-
meson.build | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/glib/meson.build b/glib/meson.build
index 7de7ace..d1d0ab4 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -227,7 +227,7 @@ libglib = shared_library('glib-2.0',
soversion : soversion,
install : true,
# intl.lib is not compatible with SAFESEH
- link_args : noseh_link_args,
+ link_args : platform_ldflags + noseh_link_args,
include_directories : configinc,
link_with : [charset_lib, gnulib_lib],
dependencies : [pcre, thread_dep, libintl, librt] + libiconv + platform_deps,
diff --git a/meson.build b/meson.build
index 83ebeb4..2839f03 100644
--- a/meson.build
+++ b/meson.build
@@ -459,6 +459,8 @@ if host_system == 'linux'
endif
endif
+platform_ldflags=[]
+
# Mac OS X Carbon support
glib_have_carbon = cc.compiles('''#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>''',
@@ -469,6 +471,7 @@ glib_have_os_x_9_or_later = false
if glib_have_carbon
glib_conf.set('HAVE_CARBON', true)
CARBON_LIBS='-Wl,-framework,Carbon' # FIXME: propagate to .pc files as well
+ platform_ldflags += [CARBON_LIBS]
glib_have_os_x_9_or_later = cc.compiles('''#include <AvailabilityMacros.h>
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
#error Compiling for minimum OS X version before 10.9
@@ -487,6 +490,7 @@ glib_have_cocoa = cc.compiles('''#include <Cocoa/Cocoa.h>
if glib_have_cocoa
glib_conf.set('HAVE_COCOA', true)
COCOA_LIBS='-Wl,-framework,Foundation' # FIXME: propagate to .pc files as well
+ platform_ldflags += [COCOA_LIBS]
else
COCOA_LIBS=''
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]