In Meson builds, fixed SRT non-native support being enabled when SRT native support is already enabled

Change-Id: I592a202708b5cce7137cd3b619defee23fc482f8
This commit is contained in:
Thulinma 2023-01-12 01:14:30 +01:00
parent 24e51ba7f3
commit 8a6b7f13aa

View file

@ -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 = []