diff options
author | Arun Raghavan <arun@arunraghavan.net> | 2018-10-28 14:55:01 +0000 |
---|---|---|
committer | Arun Raghavan <arun@arunraghavan.net> | 2018-10-28 14:57:00 +0000 |
commit | 682857751b8a76f264e02d9e6541bb9736526bbf (patch) | |
tree | abaf9e7b7b24c7051dd00e85029b623972c94891 | |
parent | b47c302cef9410f69a94b15f98087a5ca59c7afb (diff) |
build: Factor out common POSIX flag setting in meson build
-rw-r--r-- | meson.build | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meson.build b/meson.build index ec69176..52a49f7 100644 --- a/meson.build +++ b/meson.build @@ -21,19 +21,16 @@ if ['darwin', 'ios'].contains(host_system) if host_system == 'ios' os_cflags += ['-DWEBRTC_IOS'] endif - platform_cflags += ['-D WEBRTC_POSIX'] have_posix = true elif host_system == 'android' os_cflags += ['-DWEBRTC_ANDROID', '-DWEBRTC_LINUX', '-DWEBRTC_THREAD_RR', '-DWEBRTC_CLOCK_TYPE_REALTIME'] os_deps += [cc.find_library('log')] os_deps += [dependency('gnustl', required : get_option('gnustl'))] - platform_cflags += ['-DWEBRTC_POSIX'] have_posix = true elif host_system == 'linux' os_cflags += ['-DWEBRTC_LINUX', '-DWEBRTC_THREAD_RR'] os_deps += [cc.find_library('rt', required : false)] os_deps += [dependency('threads')] - platform_cflags += ['-DWEBRTC_POSIX'] have_posix = true elif host_system == 'windows' platform_cflags += ['-DWEBRTC_WIN', '-D_WIN32', '-U__STRICT_ANSI__'] @@ -41,6 +38,10 @@ elif host_system == 'windows' have_win = true endif +if have_posix + platform_cflags += ['-DWEBRTC_POSIX'] +endif + arch_cflags = [] have_arm = false have_armv7 = false |