From f1a06922f15b8839661722bc45553a5a3e19f8d1 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 19 Nov 2024 08:00:05 +0100 Subject: [PATCH] meson: add update-check option --- meson_options.txt | 6 +++++- modules/gui/qt/meson.build | 4 ++++ src/meson.build | 9 +++++++++ test/src/meson.build | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index b455ca2804..3182ef63cb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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 diff --git a/modules/gui/qt/meson.build b/modules/gui/qt/meson.build index aad1783e96..32ee6ed246 100644 --- a/modules/gui/qt/meson.build +++ b/modules/gui/qt/meson.build @@ -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 += { diff --git a/src/meson.build b/src/meson.build index 9e3bbedafb..8b43ed7098 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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, diff --git a/test/src/meson.build b/test/src/meson.build index 16f7f96986..104439abfa 100644 --- a/test/src/meson.build +++ b/test/src/meson.build @@ -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'),