diff --git a/glib/meson.build b/glib/meson.build index 7de7ace77..d1d0ab497 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 83ebeb4af..2839f0340 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 #include ''', @@ -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 #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 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