build: Factor out common POSIX flag setting in meson build
This commit is contained in:
parent
b47c302cef
commit
682857751b
@ -21,19 +21,16 @@ if ['darwin', 'ios'].contains(host_system)
|
|||||||
if host_system == 'ios'
|
if host_system == 'ios'
|
||||||
os_cflags += ['-DWEBRTC_IOS']
|
os_cflags += ['-DWEBRTC_IOS']
|
||||||
endif
|
endif
|
||||||
platform_cflags += ['-D WEBRTC_POSIX']
|
|
||||||
have_posix = true
|
have_posix = true
|
||||||
elif host_system == 'android'
|
elif host_system == 'android'
|
||||||
os_cflags += ['-DWEBRTC_ANDROID', '-DWEBRTC_LINUX', '-DWEBRTC_THREAD_RR', '-DWEBRTC_CLOCK_TYPE_REALTIME']
|
os_cflags += ['-DWEBRTC_ANDROID', '-DWEBRTC_LINUX', '-DWEBRTC_THREAD_RR', '-DWEBRTC_CLOCK_TYPE_REALTIME']
|
||||||
os_deps += [cc.find_library('log')]
|
os_deps += [cc.find_library('log')]
|
||||||
os_deps += [dependency('gnustl', required : get_option('gnustl'))]
|
os_deps += [dependency('gnustl', required : get_option('gnustl'))]
|
||||||
platform_cflags += ['-DWEBRTC_POSIX']
|
|
||||||
have_posix = true
|
have_posix = true
|
||||||
elif host_system == 'linux'
|
elif host_system == 'linux'
|
||||||
os_cflags += ['-DWEBRTC_LINUX', '-DWEBRTC_THREAD_RR']
|
os_cflags += ['-DWEBRTC_LINUX', '-DWEBRTC_THREAD_RR']
|
||||||
os_deps += [cc.find_library('rt', required : false)]
|
os_deps += [cc.find_library('rt', required : false)]
|
||||||
os_deps += [dependency('threads')]
|
os_deps += [dependency('threads')]
|
||||||
platform_cflags += ['-DWEBRTC_POSIX']
|
|
||||||
have_posix = true
|
have_posix = true
|
||||||
elif host_system == 'windows'
|
elif host_system == 'windows'
|
||||||
platform_cflags += ['-DWEBRTC_WIN', '-D_WIN32', '-U__STRICT_ANSI__']
|
platform_cflags += ['-DWEBRTC_WIN', '-D_WIN32', '-U__STRICT_ANSI__']
|
||||||
@ -41,6 +38,10 @@ elif host_system == 'windows'
|
|||||||
have_win = true
|
have_win = true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if have_posix
|
||||||
|
platform_cflags += ['-DWEBRTC_POSIX']
|
||||||
|
endif
|
||||||
|
|
||||||
arch_cflags = []
|
arch_cflags = []
|
||||||
have_arm = false
|
have_arm = false
|
||||||
have_armv7 = false
|
have_armv7 = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user