mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
meson: add carbon and cocoa libs when building for OSX
https://bugzilla.gnome.org/show_bug.cgi?id=791460
This commit is contained in:
parent
db7c1180b3
commit
17bfc39ea7
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user