[vlc-commits] [Git][videolan/vlc][master] 7 commits: codec: meson: fix undefined libavcodec_common variable

Alexandre Janniaux (@alexandre-janniaux) gitlab at videolan.org
Mon Jan 27 10:59:19 UTC 2025



Alexandre Janniaux pushed to branch master at VideoLAN / VLC


Commits:
ca39a793 by Alexandre Janniaux at 2025-01-27T10:37:05+00:00
codec: meson: fix undefined libavcodec_common variable

Disabling avcodec makes the configuration fails.

- - - - -
0b382396 by Alexandre Janniaux at 2025-01-27T10:37:05+00:00
qt/shaders: meson: fix QSB location

- - - - -
f02623d8 by Alexandre Janniaux at 2025-01-27T10:37:05+00:00
qt/shaders: meson: fix configtool variable name

Otherwise it fails while listing every variables instead of extracting
the correct one:

        ../modules/gui/qt/shaders/meson.build:26:6: ERROR: Program
        'QT_SYSROOT:\nQT_INSTALL_PREFIX:/opt/homebrew\nQT_INSTALL_ARCHDATA:/opt/homebrew/share/qt\nQT_INSTALL_DATA:/opt/homebrew/share/qt\nQT_INSTALL_DOCS:/opt/homebrew/share/qt/doc\nQT_INSTALL_HEADERS:/opt/homebrew/include\nQT_INSTALL_LIBS:/opt/homebrew/lib\nQT_INSTALL_LIBEXECS:/opt/homebrew/share/qt/libexec\nQT_INSTALL_BINS:/opt/homebrew/bin\nQT_INSTALL_TESTS:/opt/homebrew/share/qt/tests\nQT_INSTALL_PLUGINS:/opt/homebrew/share/qt/plugins\nQT_INSTALL_QML:/opt/homebrew/share/qt/qml\nQT_INSTALL_TRANSLATIONS:/opt/homebrew/share/qt/translations\nQT_INSTALL_CONFIGURATION:\nQT_INSTALL_EXAMPLES:/opt/homebrew/share/qt/examples\nQT_INSTALL_DEMOS:/opt/homebrew/share/qt/examples\nQT_HOST_PREFIX:/opt/homebrew\nQT_HOST_DATA:/opt/homebrew/share/qt\nQT_HOST_BINS:/opt/homebrew/bin\nQT_HOST_LIBEXECS:/opt/homebrew/share/qt/libexec\nQT_HOST_LIBS:/opt/homebrew/lib\nQMAKE_SPEC:macx-clang\nQMAKE_XSPEC:macx-clang\nQMAKE_VERSION:3.1\nQT_VERSION:6.7.3/qsb'
        not found or not executable

- - - - -
966fba07 by Alexandre Janniaux at 2025-01-27T10:37:05+00:00
qt: meson: add missing CoreFoundation framework

- - - - -
431d4251 by Alexandre Janniaux at 2025-01-27T10:37:05+00:00
qt: meson: move qml test

The qml tests are depending on QTest whose dependency is declared
afterwards.

- - - - -
043ef30c by Alexandre Janniaux at 2025-01-27T10:37:05+00:00
qt: meson: add missing QTest dependency

- - - - -
7f8a5af8 by Alexandre Janniaux at 2025-01-27T10:37:05+00:00
meson: remove -mmacosx-version-min flag

The flag should be defined from a cross-file, as the buildsystem allows
building for the current build environment also. Using
-mmacosx-version-min means that some of the function will rely on lazy
loading instead, which prevents optimizing for a given host or target.

- - - - -


4 changed files:

- meson.build
- modules/codec/meson.build
- modules/gui/qt/meson.build
- modules/gui/qt/shaders/meson.build


Changes:

=====================================
meson.build
=====================================
@@ -328,14 +328,6 @@ else
     have_osx = false
 endif
 
-if have_osx
-    add_project_arguments('-mmacosx-version-min=10.11',
-        language: ['c', 'cpp', 'objc'])
-    add_project_link_arguments('-mmacosx-version-min=10.11',
-        language: ['c', 'cpp', 'objc'])
-endif
-
-
 #
 # Windows and MinGW checks
 #


=====================================
modules/codec/meson.build
=====================================
@@ -567,6 +567,7 @@ if host_system == 'darwin'
 endif
 
 # FFmpeg common helper library
+libavcodec_common = disabler()
 if avcodec_dep.found()
     libavcodec_common = static_library('avcodec_common',
         files('avcodec/fourcc.c', 'avcodec/chroma.c'),


=====================================
modules/gui/qt/meson.build
=====================================
@@ -1149,7 +1149,7 @@ if qt6_dep.found()
         'name' : 'qt',
         'sources' : [qt6pre_files, qt6pre_qrc, shader_targets, shaders_processed, qt_sources, some_sources],
         'extra_files' : [shader_files],
-        'dependencies' : [qt_extra_deps, qt6_dep],
+        'dependencies' : [qt_extra_deps, qt6_dep, corefoundation_dep],
         'include_directories' : qt_include_dir,
         'c_args' : qt_extra_flags,
         'cpp_args' : [qt_extra_flags, qt_cppargs],
@@ -1157,26 +1157,6 @@ if qt6_dep.found()
         'link_with' : qmllibs,
     }
 
-    quicktest_qt6_dep = dependency('qt6', version: '=' + qt6_dep.version(), modules: ['QuickTest'], required: false)
-    if quicktest_qt6_dep.found()
-        qml_test_moc = qt6.compile_moc(
-            headers : files('tests/qml_test.hpp'),
-            dependencies : [quicktest_qt6_dep, qt6_dep]
-        )
-        qml_test = executable(
-          'qml_test',
-          [files('tests/qml_test.cpp', 'tests/qml_test.hpp'), qml_test_moc],
-          qt6pre_qrc,
-          build_by_default: false,
-          dependencies: [quicktest_qt6_dep, qt6_dep],
-          link_with: qmllibs,
-          cpp_args: ['-DQUICK_TEST_SOURCE_DIR="' + meson.current_source_dir() + '/tests"']
-        )
-        foreach test_name, test_file : qml_tests
-              test(test_name, qml_test, args: ['-input', test_file], suite:'qt')
-        endforeach
-    endif
-
     vlc_tests += {
         'name': 'base_model_test',
         'sources': files(
@@ -1267,6 +1247,26 @@ if qt6_dep.found()
             'link_with': [libvlccore, libvlc],
             'dependencies': [qt6_dep, qt_extra_deps, qtest_qt6_dep],
         }
+    endif
 
+    quicktest_qt6_dep = dependency('qt6', version: '=' + qt6_dep.version(), modules: ['QuickTest'], required: false)
+    if quicktest_qt6_dep.found() and  qtest_qt6_dep.found()
+        qml_test_moc = qt6.compile_moc(
+            headers : files('tests/qml_test.hpp'),
+            dependencies : [quicktest_qt6_dep, qt6_dep]
+        )
+        qml_test = executable(
+          'qml_test',
+          [files('tests/qml_test.cpp', 'tests/qml_test.hpp'), qml_test_moc],
+          qt6pre_qrc,
+          build_by_default: false,
+          dependencies: [quicktest_qt6_dep, qt6_dep, qtest_qt6_dep],
+          link_with: qmllibs,
+          cpp_args: ['-DQUICK_TEST_SOURCE_DIR="' + meson.current_source_dir() + '/tests"']
+        )
+        foreach test_name, test_file : qml_tests
+              test(test_name, qml_test, args: ['-input', test_file], suite:'qt')
+        endforeach
     endif
+
 endif


=====================================
modules/gui/qt/shaders/meson.build
=====================================
@@ -23,8 +23,8 @@ shader_sources = [
 
 shader_files = files(shader_sources)
 
-qt_bin_directory = qt6_dep.get_variable(pkgconfig: 'bindir', configtool: '-query QT_HOST_BINS')
-qsb = find_program(qt_bin_directory + '/qsb', required: true)
+qt_bin_directory = qt6_dep.get_variable(pkgconfig: 'bindir', configtool: 'QT_HOST_BINS')
+qsb = find_program('qsb', dirs: qt_bin_directory, required: true)
 
 qsb_params = ['--glsl=100 es,120,150', '--batchable', '-O']
 if host_system == 'windows'



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4922161d1ff4b09bea0324062a4637f384a4773b...7f8a5af85907672544a7953b68116a72f8e044d9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4922161d1ff4b09bea0324062a4637f384a4773b...7f8a5af85907672544a7953b68116a72f8e044d9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list