meson: add update-check option

This commit is contained in:
Steve Lhomme 2024-11-19 08:00:05 +01:00
parent e91fc669f2
commit f1a06922f1
4 changed files with 19 additions and 2 deletions

View File

@ -65,6 +65,11 @@ option('winstore_app',
value : false,
description : 'Build targeted for Windows Store apps')
option('update-check',
type : 'feature',
value : 'disabled',
description : 'update checking system')
option('rust',
type : 'feature',
value : 'disabled',
@ -93,7 +98,6 @@ option('avx',
# TODO: Missing neon option
# TODO: Missing sve option
# TODO: Missing altivec option
# TODO: Missing update-check option
# Font options

View File

@ -1061,6 +1061,10 @@ if qt6_dep.found()
endif
endif
if get_option('update-check').allowed() and gcrypt_dep.found()
qt_extra_flags += '-DUPDATE_CHECK'
endif
if (xcb_dep.found() and xcb_render_dep.found() and xcb_xfixes_dep.found())
vlc_modules += {

View File

@ -369,6 +369,15 @@ elif host_system == 'linux'
endif
endif
if get_option('update-check').allowed()
if not gcrypt_dep.found()
error('libgcrypt is required for update checking system')
endif
libvlccore_sources += [ 'misc/update.c', 'misc/update_crypto.c' ]
vlccore_cargs += '-DUPDATE_CHECK'
libvlccore_deps += gcrypt_dep
endif
libvlccore = library(
'vlccore',
libvlccore_sources, vlc_about, fourcc, rev_target,

View File

@ -35,7 +35,7 @@ vlc_tests += {
'link_with' : [libvlc, libvlccore],
}
if gcrypt_dep.found()
if gcrypt_dep.found() and get_option('update-check').allowed()
vlc_tests += {
'name' : 'test_src_crypto_update',
'sources' : files('crypto/update.c'),