From 8a6b7f13aa8441ee8be5fed6c5b4137036498a42 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 12 Jan 2023 01:14:30 +0100 Subject: [PATCH] In Meson builds, fixed SRT non-native support being enabled when SRT native support is already enabled Change-Id: I592a202708b5cce7137cd3b619defee23fc482f8 --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c5fa7869..b120ec67 100644 --- a/meson.build +++ b/meson.build @@ -92,8 +92,6 @@ if get_option('NOLLHLS') option_defines += '-DNOLLHLS=1' endif -add_project_arguments(option_defines, language: 'cpp') - # End of options message('Building release @0@ for version @1@ @ debug level @2@'.format(release, version, get_option('DEBUG'))) @@ -138,6 +136,9 @@ if not get_option('NOSRT') and host_machine.system() != 'darwin' libsrt = dependency('srt', fallback: ['libsrt', 'srt_dep']) endif have_srt = not get_option('NOSRT') and host_machine.system() != 'darwin' and libsrt.found() +if have_srt + option_defines += '-DWITH_SRT' +endif librist = false if not get_option('NORIST') @@ -153,6 +154,9 @@ if not get_option('NOSHM') and host_machine.system() != 'darwin' mist_deps += ccpp.find_library('rt', required : true) endif +# Set defines from active options +add_project_arguments(option_defines, language: 'cpp') + # Set build targets executables = []