build: check supported linker args before build
MacOS linker does not support --version-script argument so we need to only add it to ldflags when it is available.
This commit is contained in:
parent
44f9222212
commit
55eb69247f
|
@ -37,9 +37,9 @@ libnotify_cflags = [
|
|||
]
|
||||
|
||||
mapfile = meson.project_name() + '.map'
|
||||
libnotify_ldflags = [
|
||||
libnotify_ldflags = cc.get_supported_link_arguments([
|
||||
'-Wl,--version-script,'+join_paths(meson.current_source_dir(), mapfile),
|
||||
]
|
||||
])
|
||||
|
||||
notify_dep = declare_dependency(
|
||||
include_directories: default_includes,
|
||||
|
|
|
@ -6,6 +6,8 @@ project('libnotify',
|
|||
gnome = import('gnome')
|
||||
pkgconfig = import('pkgconfig')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
################################################################
|
||||
# libtool versioning
|
||||
################################################################
|
||||
|
|
Loading…
Reference in New Issue