[vlc-commits] [Git][videolan/vlc][master] 22 commits: configure: check disabled enable_qt at the very end

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu May 23 12:52:36 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9dc51f66 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: check disabled enable_qt at the very end

There is more than one places where qt support can be disabled.

- - - - -
184c73ba by Steve Lhomme at 2024-05-23T12:08:24+00:00
Revert "contrib: qtvlcdeps: use cmake to generate dependencies instead of qmake"

This reverts commit dea2eede25647f8a8e340898fb7d1bfb03285a41.

- - - - -
b5b229e6 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: get the static libraries needed by Qt6 from qmake

Rather than our custom qtvlcdeps

- - - - -
eaa2e02b by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: don't check QML module imports with qmake

We have a separate check for QML modules availability.

- - - - -
8fe1862e by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: rely more on qtpaths6 to get Qt pathes

We assume all Qt modules use the same version and are installed in the same prefix.
qtpaths6 (or qmake6) cannot tell the difference, so it's unlikely people would do that.
That might be possible on a system that relies on CMake and doesn't provide qmake.

- - - - -
2dd056de by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: check the Qt version reported by qtpaths

- - - - -
c110a85c by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: get Qt6 CFLAGS from qmake

- - - - -
9fc6ea3c by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: detect private Qt6 Core using qmake

It's faster than compiling a file.

- - - - -
cdb60a77 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: detect private Qt6 GUI using qmake

It's faster than compiling a file.

- - - - -
20d63bd8 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: detect private Qt6 Quick using qmake

It's faster than compiling a file.

- - - - -
c434cc16 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: remove empty section to compile private headers

- - - - -
ce1e02d0 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: detect Qt6 QuickTest using qmake

Rather than using pkgconfig and a python script.

- - - - -
e5546bc0 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: detect private Qt6 Wayland Client using qmake

- - - - -
02a35d27 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: check availability of Qt modules using qmake

- - - - -
a6310130 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: remove unused check for static libraries

- - - - -
9b415804 by Steve Lhomme at 2024-05-23T12:08:24+00:00
qt: remove unused QPNI_HEADER define

It's neither used in VLC nor in Qt headers.

- - - - -
38321154 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: don't expose the Qt version number

qmake will provide the proper private includes to use

- - - - -
4ae42ebb by Steve Lhomme at 2024-05-23T12:08:24+00:00
contrib: qtwayland: build if qt is selected on Linux

That's the same condition as qtvlcdeps.

- - - - -
68957d42 by Steve Lhomme at 2024-05-23T12:08:24+00:00
contrib: qt: disable generating .pc files

We don't use them anymore

- - - - -
f6e3ef02 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: remove write-only QT_INCLUDE_DIRECTORY

- - - - -
dfa427ed by Steve Lhomme at 2024-05-23T12:08:24+00:00
qt: remove unused QT5_PLUGINS_LIBS

- - - - -
502824e3 by Steve Lhomme at 2024-05-23T12:08:24+00:00
configure: make Qt logs less verbose

Only show the qmake command once.

- - - - -


16 changed files:

- configure.ac
- − contrib/src/qt/0002-Try-to-generate-pkgconfig-pc-files-in-static-build.patch
- contrib/src/qt/rules.mak
- − contrib/src/qtvlcdeps/CMakeLists.txt
- − contrib/src/qtvlcdeps/Imports.qml
- − contrib/src/qtvlcdeps/qtvlcdeps.pc.in
- − contrib/src/qtvlcdeps/rules.mak
- contrib/src/qtwayland/rules.mak
- modules/gui/qt/Makefile.am
- modules/gui/qt/meson.build
- + modules/gui/qt/private-core.pro
- + modules/gui/qt/private-gui.pro
- + modules/gui/qt/private-quick.pro
- + modules/gui/qt/qt6.pro
- + modules/gui/qt/quicktest.pro
- + modules/gui/qt/wayland.pro


Changes:

=====================================
configure.ac
=====================================
@@ -3971,54 +3971,79 @@ have_qt_gui_private="no"
 have_qt_core_private="no"
 have_fxc="no"
 AS_IF([test "${enable_qt}" != "no"], [
-  dnl Note that Qt < 6.2.5 does not provide pc files!
+  have_qt="yes"
+  AC_PATH_PROGS(QTPATHS6, [qtpaths6], qtpaths6, ["${CONTRIB_DIR}/../bin:$PATH"])
+
+  QT_PATHS=${QTPATHS6}
+  AC_MSG_CHECKING([if contribs provide target_qt.conf])
+  AS_IF([test -e "${CONTRIB_DIR}/bin/target_qt.conf"], [
+      QT_CONF=${CONTRIB_DIR}/bin/target_qt.conf
+      QT_PATHS="${QT_PATHS} --qtconf ${QT_CONF}"
+      AC_MSG_RESULT([yes])
+  ],[
+      AC_MSG_RESULT([no])
+  ])
+
   QT_MINIMUM_VERSION=6.2
-  PKG_CHECK_MODULES([QT], m4_foreach([pkg], [
-      Qt6Core Qt6Widgets Qt6Gui Qt6Qml Qt6QmlModels Qt6QmlWorkerScript
-      Qt6Quick Qt6QuickControls2 Qt6QuickLayouts Qt6QuickTemplates2
-      Qt6Svg
-    ], [pkg >= ${QT_MINIMUM_VERSION}]), [
-
-      QT_PREFIX_PATH="$(eval $PKG_CONFIG --variable=prefix Qt6Core)"
-      QT_PLUGINS_PATH="${QT_PREFIX_PATH}/plugins"
-
-      PKG_CHECK_MODULES([QT_WAYLAND], [Qt6WaylandClient >= ${QT_MINIMUM_VERSION}], [
-          have_qt_wayland="yes"
-      ],[:])
-
-      QT_INCLUDE_DIRECTORY="$(eval $PKG_CONFIG --variable=includedir Qt6Core)"
-      QT_LIB_DIRECTORY="$(eval $PKG_CONFIG --variable=libdir Qt6Core)"
-      QT_VERSION_CORE="$(eval $PKG_CONFIG --modversion Qt6Core)"
-      QT_VERSION_GUI="$(eval $PKG_CONFIG --modversion Qt6Gui)"
-      QT_VERSION_QML="$(eval $PKG_CONFIG --modversion Qt6Qml)"
-      QT_VERSION_QUICK="$(eval $PKG_CONFIG --modversion Qt6Quick)"
-
-      AS_IF([test "${host}" = "${build}"],[
-        dnl native build, we can use the exectuables of the Qt6 target
-        QT_BIN_DIRECTORY="$(eval $PKG_CONFIG --variable=bindir Qt6Core)"
-        QT_LIBEXEC_DIRECTORY="$(eval $PKG_CONFIG --variable=libexecdir Qt6Core)"
-        QT_QML_LIBEXEC_DIRECTORY="$(eval $PKG_CONFIG --variable=libexecdir Qt6Qml)"
-        QT_SHADERTOOLS_BIN_DIRECTORY="$(eval $PKG_CONFIG --variable=bindir Qt6ShaderTools)"
-      ],[
-        dnl cross compilation, use Qt6 native tools from contribs
-        AS_IF([test -n "${CONTRIB_DIR}"], [
-          QT_BIN_DIRECTORY=${CONTRIB_DIR}/../bin
-          QT_LIBEXEC_DIRECTORY=${CONTRIB_DIR}/../libexec
-          QT_QML_LIBEXEC_DIRECTORY=${QT_LIBEXEC_DIRECTORY}
-          QT_SHADERTOOLS_BIN_DIRECTORY=${QT_BIN_DIRECTORY}
-        ])
-      ])
+  AC_MSG_CHECKING([Qt is at least ${QT_MINIMUM_VERSION}])
+  QT_VERSION_CORE="$(${QT_PATHS}          --query QT_VERSION 2>/dev/null)"
+  QT_MINIMUM_MAJ=$(echo ${QT_MINIMUM_VERSION} | cut -d "." -f -1)
+  QT_MINIMUM_MIN=$(echo ${QT_MINIMUM_VERSION} | cut -d "." -f 2-2)
+  QT_VERSION_MAJ=$(echo ${QT_VERSION_CORE} | cut -d "." -f -1)
+  QT_VERSION_MIN=$(echo ${QT_VERSION_CORE} | cut -d "." -f 2-2)
+  AS_IF([ test "${QT_VERSION_MAJ}" -lt "${QT_MINIMUM_MAJ}" || (test "${QT_VERSION_MAJ}" = "${QT_MINIMUM_MAJ}" && test "${QT_VERSION_MIN}" -lt "${QT_MINIMUM_MIN}") ], [
+    AC_MSG_RESULT([(${QT_VERSION_CORE}) no])
+    have_qt="no"
+  ],[
+    AC_MSG_RESULT([(${QT_VERSION_CORE}) yes])
+
+  QT_BIN_DIRECTORY="$(${QT_PATHS}         --query QT_HOST_BINS 2>/dev/null)"
+  QMAKE="${QT_BIN_DIRECTORY}/qmake"
+  AS_IF([test -n "${QT_CONF}"],[
+      QMAKE="${QMAKE} -qtconf ${QT_CONF}"
+  ])
+  AC_MSG_NOTICE([using ${QMAKE}])
+
+  AC_MSG_CHECKING([for Qt libraries])
+  mkdir -p ${ac_pwd}/modules/gui/qt
+  touch    ${ac_pwd}/modules/gui/qt/.qmake.stash
+  QT_PKG_ERRORS=$(${QMAKE} ${srcdir}/modules/gui/qt/qt6.pro -o ${ac_pwd}/modules/gui/qt/qmake-qt 2>&1)
+  ac_status=$?
+  AS_IF([test $ac_status = 0 && test -f ${ac_pwd}/modules/gui/qt/qmake-qt],[
+      echo "get_cflags:"                    >> ${ac_pwd}/modules/gui/qt/qmake-qt
+      echo '	$(info $(DEFINES) $(INCPATH))' >> ${ac_pwd}/modules/gui/qt/qmake-qt
+      echo "get_libs:"                      >> ${ac_pwd}/modules/gui/qt/qmake-qt
+      echo '	echo $(LIBS) | sed -e "s@/[[^ ]]*/lib\([[^ ]]*\)\.so at -l\1 at g"' >> ${ac_pwd}/modules/gui/qt/qmake-qt
+      AC_MSG_RESULT([yes])
+      QT_LIBS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-qt get_libs)
+      QT_CFLAGS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-qt get_cflags)
+      AC_SUBST([QT_LIBS])
+      AC_SUBST([QT_CFLAGS])
 
-      AC_MSG_CHECKING([if contribs provide target_qt.conf])
-      AS_IF([test -e "${CONTRIB_DIR}/bin/target_qt.conf"], [
-        QT_CONF=${CONTRIB_DIR}/bin/target_qt.conf
+      AC_MSG_CHECKING([for Qt6WaylandClient])
+      (${QMAKE} ${srcdir}/modules/gui/qt/wayland.pro -o ${ac_pwd}/modules/gui/qt/qmake-wayland) 2>/dev/null
+      ac_status=$?
+      AS_IF([test $ac_status = 0 && test -f ${ac_pwd}/modules/gui/qt/qmake-wayland],[
+        echo 'get_cflags:'                     >> ${ac_pwd}/modules/gui/qt/qmake-wayland
+        echo '	$(info $(DEFINES) $(INCPATH))' >> ${ac_pwd}/modules/gui/qt/qmake-wayland
+        echo 'get_libs:'                       >> ${ac_pwd}/modules/gui/qt/qmake-wayland
+        echo '	echo $(LIBS) | sed -e "s@/[[^ ]]*/lib\([[^ ]]*\)\.so at -l\1 at g"' >> ${ac_pwd}/modules/gui/qt/qmake-wayland
         AC_MSG_RESULT([yes])
+        QT_WAYLAND_LIBS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-wayland get_libs)
+        QT_WAYLAND_CFLAGS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-wayland get_cflags)
+        AC_SUBST([QT_WAYLAND_LIBS])
+        AC_SUBST([QT_WAYLAND_CFLAGS])
+        have_qt_wayland="yes"
       ],[
         AC_MSG_RESULT([no])
       ])
+      rm -f ${ac_pwd}/modules/gui/qt/qmake-wayland
+
+      QT_LIBEXEC_DIRECTORY="$(${QT_PATHS}     --query QT_HOST_LIBEXECS 2>/dev/null)"
+      QT_QML_LIBEXEC_DIRECTORY=${QT_LIBEXEC_DIRECTORY}
+      QT_SHADERTOOLS_BIN_DIRECTORY=${QT_BIN_DIRECTORY}
 
       dnl check native in contribs and keep the full path if found there
-      AC_PATH_PROGS(QTPATHS6, [qtpaths6], qtpaths6, ["${QT_BIN_DIRECTORY}"])
       AC_PATH_PROGS(MOC, [moc], moc, ["${QT_LIBEXEC_DIRECTORY}"])
       AC_PATH_PROGS(RCC, [rcc], rcc, ["${QT_LIBEXEC_DIRECTORY}"])
       AC_PATH_PROGS(UIC, [uic], uic, ["${QT_LIBEXEC_DIRECTORY}"])
@@ -4045,19 +4070,35 @@ AS_IF([test "${enable_qt}" != "no"], [
       ],[
         AC_MSG_RESULT([no])
         AC_MSG_WARN([qt runtime dependencies are missing, disabling qt interface])
-        enable_qt="no"
+        have_qt="no"
       ])
 
-      PKG_CHECK_MODULES([QT_QUICK_TEST], [Qt6QuickTest >= ${QT_MINIMUM_VERSION}], [
-          AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py \
-            --qtpaths "${QTPATHS6}" \
-            --qtconf "${QT_CONF}" \
-            --modules QtTest="" \
-            >&AS_MESSAGE_FD ], [
-              have_qt_quick_test="yes"
-          ], [])
+      AC_MSG_CHECKING([for QuickTest])
+      (${QMAKE} ${srcdir}/modules/gui/qt/quicktest.pro -o ${ac_pwd}/modules/gui/qt/qmake-quicktest) 2>/dev/null
+      ac_status=$?
+      AS_IF([test $ac_status = 0 && test -f ${ac_pwd}/modules/gui/qt/qmake-quicktest],[
+        AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py \
+        --qtpaths "${QTPATHS6}" \
+        --qtconf "${QT_CONF}" \
+        --modules QtTest="" \
+        >&AS_MESSAGE_FD ], [
+            echo 'get_cflags:'                     >> ${ac_pwd}/modules/gui/qt/qmake-quicktest
+            echo '	$(info $(DEFINES) $(INCPATH))' >> ${ac_pwd}/modules/gui/qt/qmake-quicktest
+            echo 'get_libs:'                       >> ${ac_pwd}/modules/gui/qt/qmake-quicktest
+            echo '	echo $(LIBS) | sed -e "s@/[[^ ]]*/lib\([[^ ]]*\)\.so at -l\1 at g"' >> ${ac_pwd}/modules/gui/qt/qmake-quicktest
+            AC_MSG_RESULT([yes])
+            QT_QUICK_TEST_LIBS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-quicktest get_libs)
+            QT_QUICK_TEST_CFLAGS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-quicktest get_cflags)
+            AC_SUBST([QT_QUICK_TEST_LIBS])
+            AC_SUBST([QT_QUICK_TEST_CFLAGS])
+            have_qt_quick_test="yes"
+        ], [
+            AC_MSG_RESULT([no])
+        ])
       ],[
+        AC_MSG_RESULT([no])
       ])
+      rm -f ${ac_pwd}/modules/gui/qt/qmake-quicktest
 
       AC_PATH_PROGS(FXC, [fxc], [no], [${CONTRIB_DIR}/bin])
       AS_IF([test "$FXC" != "no"],[
@@ -4066,50 +4107,75 @@ AS_IF([test "${enable_qt}" != "no"], [
         AC_SUBST([FXC_PATH])
       ])
 
-      dnl Check private headers availability
-      VLC_SAVE_FLAGS
-      CPPFLAGS="${CPPFLAGS} ${QT_CFLAGS}"
-      CPPFLAGS="${CPPFLAGS} -I${QT_INCLUDE_DIRECTORY}/QtCore/${QT_VERSION_CORE}"
-      CPPFLAGS="${CPPFLAGS} -I${QT_INCLUDE_DIRECTORY}/QtCore/${QT_VERSION_CORE}/QtCore"
-      CPPFLAGS="${CPPFLAGS} -I${QT_INCLUDE_DIRECTORY}/QtGui/${QT_VERSION_GUI}"
-      CPPFLAGS="${CPPFLAGS} -I${QT_INCLUDE_DIRECTORY}/QtGui/${QT_VERSION_GUI}/QtGui"
-      CPPFLAGS="${CPPFLAGS} -I${QT_INCLUDE_DIRECTORY}/QtQml/${QT_VERSION_QML}"
-      CPPFLAGS="${CPPFLAGS} -I${QT_INCLUDE_DIRECTORY}/QtQml/${QT_VERSION_QML}/QtQml"
-      CPPFLAGS="${CPPFLAGS} -I${QT_INCLUDE_DIRECTORY}/QtQuick/${QT_VERSION_QUICK}"
-      CPPFLAGS="${CPPFLAGS} -I${QT_INCLUDE_DIRECTORY}/QtQuick/${QT_VERSION_QUICK}/QtQuick"
-
-      AS_IF([test "${SYS}" != "mingw32"], [
-          CPPFLAGS="${CPPFLAGS} -fPIC"
+      AC_MSG_CHECKING([for Qt Core private])
+      (${QMAKE} ${srcdir}/modules/gui/qt/private-core.pro -o ${ac_pwd}/modules/gui/qt/qmake-private-core) 2>/dev/null
+      ac_status=$?
+      AS_IF([test $ac_status = 0 && test -f ${ac_pwd}/modules/gui/qt/qmake-private-core],[
+        echo 'get_cflags:'                     >> ${ac_pwd}/modules/gui/qt/qmake-private-core
+        echo '	$(info $(DEFINES) $(INCPATH))' >> ${ac_pwd}/modules/gui/qt/qmake-private-core
+        echo 'get_libs:'                       >> ${ac_pwd}/modules/gui/qt/qmake-private-core
+        echo '	echo $(LIBS) | sed -e "s@/[[^ ]]*/lib\([[^ ]]*\)\.so at -l\1 at g"' >> ${ac_pwd}/modules/gui/qt/qmake-private-core
+        AC_MSG_RESULT([yes])
+        QT_CORE_PRIVATE_LIBS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-private-core get_libs)
+        QT_CORE_PRIVATE_CFLAGS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-private-core get_cflags)
+        AC_SUBST([QT_CORE_PRIVATE_LIBS])
+        AC_SUBST([QT_CORE_PRIVATE_CFLAGS])
+        have_qt_core_private="yes"
+      ],[
+        AC_MSG_RESULT([no])
       ])
+      rm -f ${ac_pwd}/modules/gui/qt/qmake-private-core
 
-      AC_LANG_PUSH([C++])
-      AC_CHECK_HEADERS([private/qobject_p.h],
-         [have_qt_core_private="yes"], [])
-      AC_CHECK_HEADERS([private/qquickitem_p.h private/qquickwindow_p.h],
-         [have_qt_declarative_private="yes"], [])
-      AC_CHECK_HEADERS([QtGui/qpa/qplatformnativeinterface.h],
-         [have_qt_gui_private="yes"], [])
-      AC_LANG_POP([C++])
-      VLC_RESTORE_FLAGS
-
-      VLC_SAVE_FLAGS
-      CPPFLAGS="${CPPFLAGS} ${QT_CFLAGS}"
-      AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <qconfig.h>]],[[QT_STATIC]])],
-        [have_qt_static=yes],[have_qt_static=no])
-      VLC_RESTORE_FLAGS
+      AC_MSG_CHECKING([for Qt GUI private])
+      (${QMAKE} ${srcdir}/modules/gui/qt/private-gui.pro -o ${ac_pwd}/modules/gui/qt/qmake-private-gui) 2>/dev/null
+      ac_status=$?
+      AS_IF([test $ac_status = 0 && test -f ${ac_pwd}/modules/gui/qt/qmake-private-gui],[
+        echo 'get_cflags:'                     >> ${ac_pwd}/modules/gui/qt/qmake-private-gui
+        echo '	$(info $(DEFINES) $(INCPATH))' >> ${ac_pwd}/modules/gui/qt/qmake-private-gui
+        echo 'get_libs:'                       >> ${ac_pwd}/modules/gui/qt/qmake-private-gui
+        echo '	echo $(LIBS) | sed -e "s@/[[^ ]]*/lib\([[^ ]]*\)\.so at -l\1 at g"' >> ${ac_pwd}/modules/gui/qt/qmake-private-gui
+        AC_MSG_RESULT([yes])
+        QT_GUI_PRIVATE_LIBS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-private-gui get_libs)
+        QT_GUI_PRIVATE_CFLAGS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-private-gui get_cflags)
+        AC_SUBST([QT_GUI_PRIVATE_LIBS])
+        AC_SUBST([QT_GUI_PRIVATE_CFLAGS])
+        have_qt_gui_private="yes"
+      ],[
+        AC_MSG_RESULT([no])
+      ])
+      rm -f ${ac_pwd}/modules/gui/qt/qmake-private-gui
 
-      AS_IF([test "${have_qt_static}" = "yes"],[
-        PKG_CHECK_MODULES([VLCQTDEPS], [qtvlcdeps], [], [
-            enable_qt="no"
-        ])
+      AC_MSG_CHECKING([for Qt Quick private])
+      (${QMAKE} ${srcdir}/modules/gui/qt/private-quick.pro -o ${ac_pwd}/modules/gui/qt/qmake-private-quick) 2>/dev/null
+      ac_status=$?
+      AS_IF([test $ac_status = 0 && test -f ${ac_pwd}/modules/gui/qt/qmake-private-quick],[
+        echo 'get_cflags:'                     >> ${ac_pwd}/modules/gui/qt/qmake-private-quick
+        echo '	$(info $(DEFINES) $(INCPATH))' >> ${ac_pwd}/modules/gui/qt/qmake-private-quick
+        echo 'get_libs:'                       >> ${ac_pwd}/modules/gui/qt/qmake-private-quick
+        echo '	echo $(LIBS) | sed -e "s@/[[^ ]]*/lib\([[^ ]]*\)\.so at -l\1 at g"' >> ${ac_pwd}/modules/gui/qt/qmake-private-quick
+        AC_MSG_RESULT([yes])
+        QT_QUICK_PRIVATE_LIBS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-private-quick get_libs)
+        QT_QUICK_PRIVATE_CFLAGS=$(cd ${ac_pwd}/modules/gui/qt && make -s -f qmake-private-quick get_cflags)
+        AC_SUBST([QT_QUICK_PRIVATE_LIBS])
+        AC_SUBST([QT_QUICK_PRIVATE_CFLAGS])
+        have_qt_declarative_private="yes"
+      ],[
+        AC_MSG_RESULT([no])
       ])
+      rm -f ${ac_pwd}/modules/gui/qt/qmake-private-quick
 
       dnl gtk theme provider
       PKG_CHECK_MODULES([GTK3], [gtk+-3.0 >= 3.20], [
         have_qt_gtk="yes"
       ], [:])
     ], [
+      AC_MSG_RESULT([no])
+      have_qt="no"
+    ])
+  ])
+  rm -f ${ac_pwd}/modules/gui/qt/qmake-qt
+  rm -f ${ac_pwd}/modules/gui/qt/.qmake.stash
+    AS_IF([test "${have_qt}" = "no"],[
       AS_IF([test -n "${enable_qt}"],[
         AC_MSG_ERROR([${QT_PKG_ERRORS}. If you want to build VLC without GUI, pass --disable-qt.])
       ],[
@@ -4131,14 +4197,8 @@ AM_CONDITIONAL(QT_QML_DEBUG, [test "${enable_qt_qml_debug}" = "yes"])
 AS_IF([test "${enable_qt}" != "no"], [
   ALIASES="${ALIASES} qvlc"
 ])
-AC_SUBST([QT_VERSION_CORE])
-AC_SUBST([QT_VERSION_GUI])
-AC_SUBST([QT_VERSION_QML])
-AC_SUBST([QT_VERSION_QUICK])
-AC_SUBST([QT_INCLUDE_DIRECTORY])
 AC_SUBST([QT_INDIRECT_LIBS])
 AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" != "no"])
-AM_CONDITIONAL([QT_STATIC], [test "${have_qt_static}" = "yes"])
 AM_CONDITIONAL([HAVE_QT_WAYLAND], [test "${have_qt_wayland}" = "yes"])
 AM_CONDITIONAL([HAVE_QT_GTK], [test "${have_qt_gtk}" = "yes"])
 AM_CONDITIONAL([HAVE_QT_QUICK_TEST], [test "${have_qt_quick_test}" = "yes"])


=====================================
contrib/src/qt/0002-Try-to-generate-pkgconfig-pc-files-in-static-build.patch deleted
=====================================
@@ -1,30 +0,0 @@
-From 25f81e4e301efa03c4b72eda8ea10249f2779b55 Mon Sep 17 00:00:00 2001
-From: Fatih Uzunoglu <fuzun54 at outlook.com>
-Date: Mon, 8 Jan 2024 21:52:41 +0200
-Subject: [PATCH 2/7] Try to generate pkgconfig pc files in static build
-
----
- cmake/QtPkgConfigHelpers.cmake | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/cmake/QtPkgConfigHelpers.cmake b/cmake/QtPkgConfigHelpers.cmake
-index dbe736c438..caacd4e8ed 100644
---- a/cmake/QtPkgConfigHelpers.cmake
-+++ b/cmake/QtPkgConfigHelpers.cmake
-@@ -26,9 +26,10 @@ function(qt_internal_generate_pkg_config_file module)
-         AND NOT MINGW OR CMAKE_VERSION VERSION_LESS "3.20" OR ANDROID)
-         return()
-     endif()
--    if(NOT BUILD_SHARED_LIBS)
--        return()
--    endif()
-+	# Try to generate pc files also in static build
-+    #if(NOT BUILD_SHARED_LIBS)
-+    #    return()
-+    #endif()
- 
-     set(pkgconfig_file "${QT_CMAKE_EXPORT_NAMESPACE}${module}")
-     set(pkgconfig_name "${QT_CMAKE_EXPORT_NAMESPACE} ${module}")
--- 
-2.44.0
-


=====================================
contrib/src/qt/rules.mak
=====================================
@@ -44,7 +44,6 @@ $(TARBALLS)/qtbase-everywhere-src-$(QTBASE_VERSION_FULL).tar.xz:
 qt: qtbase-everywhere-src-$(QTBASE_VERSION_FULL).tar.xz .sum-qt
 	$(UNPACK)
 	$(APPLY) $(SRC)/qt/0001-Windows-Tray-Icon-Set-NOSOUND.patch
-	$(APPLY) $(SRC)/qt/0002-Try-to-generate-pkgconfig-pc-files-in-static-build.patch
 	$(APPLY) $(SRC)/qt/0003-Revert-QMutex-remove-qmutex_win.cpp.patch
 	$(APPLY) $(SRC)/qt/0004-Expose-QRhiImplementation-in-QRhi.patch
 	$(APPLY) $(SRC)/qt/0005-Do-not-include-D3D12MemAlloc.h-in-header-file.patch
@@ -79,7 +78,7 @@ QTBASE_CONFIG += -static -opensource -confirm-license -no-pkg-config -no-openssl
 	-no-feature-movie -no-feature-pdf -no-feature-whatsthis -no-feature-lcdnumber \
 	-no-feature-syntaxhighlighter -no-feature-undoview -no-feature-splashscreen \
 	-no-feature-dockwidget -no-feature-mdiarea -no-feature-statusbar -no-feature-statustip \
-	-no-feature-keysequenceedit \
+	-no-feature-keysequenceedit -no-feature-pkg-config \
 	-nomake examples -prefix $(PREFIX) -qt-host-path $(BUILDPREFIX) \
 	-- -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake)
 


=====================================
contrib/src/qtvlcdeps/CMakeLists.txt deleted
=====================================
@@ -1,50 +0,0 @@
-cmake_minimum_required(VERSION 3.16)
-
-project(qtvlcdeps VERSION 0.1 LANGUAGES CXX)
-
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
-find_package(Qt6 6.2 REQUIRED COMPONENTS Core Gui Qml Svg Quick Widgets QuickControls2)
-
-qt_standard_project_setup(REQUIRES 6.2)
-
-qt_add_executable(qtvlcdeps)
-
-qt_add_qml_module(qtvlcdeps
-    URI qtvlcdeps
-    RESOURCE_PREFIX qtvlcdeps
-    QML_FILES
-        Imports.qml
-)
-
-qt_import_plugins(qtvlcdeps
-    INCLUDE Qt::QSvgIconPlugin Qt::QSvgPlugin Qt::QJpegPlugin Qt::QICOPlugin
-)
-
-if (WIN32)
-    qt_import_plugins(qtvlcdeps
-        INCLUDE Qt::QWindowsIntegrationPlugin Qt::QModernWindowsStylePlugin
-    )
-endif (WIN32)
-
-if (UNIX)
-    qt_import_plugins(qtvlcdeps
-        INCLUDE Qt::QXcbGlxIntegrationPlugin Qt::QXcbEglIntegrationPlugin Qt::QXcbIntegrationPlugin Qt::QWaylandIntegrationPlugin Qt::QWaylandEglPlatformIntegrationPlugin Qt::QGtk3ThemePlugin Qt::QXdgDesktopPortalThemePlugin Qt::QWaylandXdgShellPlatformIntegrationPlugin
-    )
-endif (UNIX)
-
-if (APPLE)
-    qt_import_plugins(qtvlcdeps
-        INCLUDE Qt::QCocoaIntegrationPlugin Qt::QMacStylePlugin
-    )
-endif (APPLE)
-
-
-set_target_properties(qtvlcdeps PROPERTIES
-    WIN32_EXECUTABLE TRUE
-    qt_no_entrypoint TRUE
-)
-
-target_link_libraries(qtvlcdeps
-    PRIVATE Qt6::Core Qt6::Gui Qt6::Qml Qt6::Svg Qt6::Quick Qt6::Widgets Qt6::QuickControls2
-)


=====================================
contrib/src/qtvlcdeps/Imports.qml deleted
=====================================
@@ -1,11 +0,0 @@
-import QtQml
-import QtQml.Models
-import QtQuick
-import QtQuick.Templates
-import QtQuick.Controls
-import QtQuick.Layouts
-import QtQuick.Window
-import Qt5Compat.GraphicalEffects
-
-
-QtObject { }


=====================================
contrib/src/qtvlcdeps/qtvlcdeps.pc.in deleted
=====================================
@@ -1,11 +0,0 @@
-prefix=@@CONTRIB_PREFIX@@
-exec_prefix=${prefix}
-libdir=${prefix}/lib
-pluginsdir=${prefix}/plugins
-qmldir=${prefix}/qml
-
-Name: qtvlcdeps
-Description: Qt dependencies for VLC media player
-Version: 0.1
-
-Libs: %1


=====================================
contrib/src/qtvlcdeps/rules.mak deleted
=====================================
@@ -1,42 +0,0 @@
-# qtvlcdeps
-
-DEPS_qtvlcdeps += qt $(DEPS_qt) qtsvg $(DEPS_qtsvg) qtdeclarative $(DEPS_qtdeclarative) qt5compat $(DEPS_qt5compat)
-
-ifdef HAVE_LINUX
-DEPS_qtvlcdeps += qtwayland $(DEPS_qtwayland)
-endif
-
-ifneq ($(findstring qt,$(PKGS)),)
-PKGS += qtvlcdeps
-endif
-
-ifeq ($(call need_pkg,"qtvlcdeps >= 0.1"),)
-PKGS_FOUND += qtvlcdeps
-endif
-
-QT_VLC_DEP_SOURCES := Imports.qml qtvlcdeps.pc.in CMakeLists.txt
-
-.sum-qtvlcdeps:
-	touch $@
-
-qtvlcdeps: UNPACK_DIR=qtvlcdeps-unpack
-qtvlcdeps:
-	$(RM) -R $@ && mkdir -p $(UNPACK_DIR)
-	for f in $(QT_VLC_DEP_SOURCES) ; do \
-	  cp -f $(SRC)/qtvlcdeps/$$f $(UNPACK_DIR) ; \
-	done
-	$(MOVE)
-
-.qtvlcdeps: qtvlcdeps
-	$(CMAKECLEAN)
-	$(HOSTVARS) $(CMAKE) -G Ninja -DCMAKE_TOOLCHAIN_FILE=$(PREFIX)/lib/cmake/Qt6/qt.toolchain.cmake
-	QT_LIBS=$$(awk -F '=' '/LINK_LIBRARIES/ {print $$2; exit}' $(BUILD_DIR)/build.ninja); \
-	  cat $</qtvlcdeps.pc.in                         | \
-	  sed "s|%1|$$QT_LIBS|"                          | \
-	  sed "s|$(PREFIX)/lib/|$$\{libdir\}/|g"         | \
-	  sed "s|$(PREFIX)/plugins/|$$\{pluginsdir\}/|g" | \
-	  sed "s|$(PREFIX)/qml/|$$\{qmldir\}/|g"         | \
-	  sed "s|$(PREFIX)/|$$\{prefix\}/|g"             | \
-	  sed "s|@@CONTRIB_PREFIX@@|$(PREFIX)|" > $</qtvlcdeps.pc
-	install -d $(PREFIX)/lib/pkgconfig && install $</qtvlcdeps.pc $(PREFIX)/lib/pkgconfig
-	touch $@


=====================================
contrib/src/qtwayland/rules.mak
=====================================
@@ -4,6 +4,12 @@ QTWAYLAND_VERSION_MAJOR := 6.7
 QTWAYLAND_VERSION := $(QTWAYLAND_VERSION_MAJOR).0
 QTWAYLAND_URL := $(QT)/$(QTWAYLAND_VERSION_MAJOR)/$(QTWAYLAND_VERSION)/submodules/qtwayland-everywhere-src-$(QTWAYLAND_VERSION).tar.xz
 
+ifdef HAVE_LINUX
+ifneq ($(findstring qt,$(PKGS)),)
+PKGS += qtwayland
+endif
+endif
+
 DEPS_qtwayland = qtdeclarative $(DEPS_qtdeclarative)
 
 $(TARBALLS)/qtwayland-everywhere-src-$(QTWAYLAND_VERSION).tar.xz:


=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -16,9 +16,9 @@ guidir = $(pluginsdir)/gui
 gui_LTLIBRARIES =
 SUFFIXES += .ui .h .hpp .moc.cpp .qml
 TEST_EXTENSIONS = .qml
-EXTRA_DIST =
+EXTRA_DIST = qt6.pro private-core.pro private-gui.pro private-quick.pro quicktest.pro wayland.pro
 
-vlc_qt_libs = $(QT_LIBS) $(VLCQTDEPS_LIBS)
+vlc_qt_libs = $(QT_LIBS)
 
 vlc_qt_check_SOURCES = vlc-qt-check.cpp plugins.hpp
 vlc_qt_check_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC $(CXXFLAGS_qt)
@@ -37,8 +37,7 @@ libqt_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_qt) \
 	-I$(builddir)/dialogs/podcast \
 	-I$(builddir)/dialogs/preferences \
 	-I$(builddir)/dialogs/sout \
-	-I$(builddir)/dialogs/vlm \
-	-DQPNI_HEADER=\<$(QT_VERSION_GUI)/QtGui/qpa/qplatformnativeinterface.h\>
+	-I$(builddir)/dialogs/vlm
 
 libqt_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt)
 libqt_plugin_la_LIBADD = $(vlc_qt_libs)
@@ -77,28 +76,15 @@ libqt_plugin_la_CPPFLAGS += -DQT_HAS_GTK
 endif
 
 if HAVE_QT_CORE_PRIVATE
-libqt_plugin_la_CPPFLAGS += -DQT_CORE_PRIVATE
+libqt_plugin_la_CPPFLAGS += -DQT_CORE_PRIVATE $(QT_CORE_PRIVATE_CFLAGS)
 endif
 
 if HAVE_QT_GUI_PRIVATE
-libqt_plugin_la_CPPFLAGS += -DQT_GUI_PRIVATE \
-	-I$(QT_INCLUDE_DIRECTORY)/QtCore/$(QT_VERSION_CORE) \
-	-I$(QT_INCLUDE_DIRECTORY)/QtCore/$(QT_VERSION_CORE)/QtCore \
-	-I$(QT_INCLUDE_DIRECTORY)/QtGui/$(QT_VERSION_GUI) \
-	-I$(QT_INCLUDE_DIRECTORY)/QtGui/$(QT_VERSION_GUI)/QtGui
+libqt_plugin_la_CPPFLAGS += -DQT_GUI_PRIVATE $(QT_GUI_PRIVATE_CFLAGS)
 endif
 
 if HAVE_QT_DECLARATIVE_PRIVATE
-libqt_plugin_la_CPPFLAGS += -DQT_DECLARATIVE_PRIVATE \
-	-I$(QT_INCLUDE_DIRECTORY)/QtCore/$(QT_VERSION_CORE) \
-	-I$(QT_INCLUDE_DIRECTORY)/QtCore/$(QT_VERSION_CORE)/QtCore \
-	-I$(QT_INCLUDE_DIRECTORY)/QtGui/$(QT_VERSION_GUI) \
-	-I$(QT_INCLUDE_DIRECTORY)/QtGui/$(QT_VERSION_GUI)/QtGui \
-	-I$(QT_INCLUDE_DIRECTORY)/QtQml/$(QT_VERSION_QML) \
-	-I$(QT_INCLUDE_DIRECTORY)/QtQml/$(QT_VERSION_QML)/QtQml \
-	-I$(QT_INCLUDE_DIRECTORY)/QtQuick/$(QT_VERSION_QUICK) \
-	-I$(QT_INCLUDE_DIRECTORY)/QtQuick/$(QT_VERSION_QUICK)/QtQuick
-
+libqt_plugin_la_CPPFLAGS += -DQT_DECLARATIVE_PRIVATE $(QT_QUICK_PRIVATE_CFLAGS)
 endif
 
 libqt_plugin_la_SOURCES = \
@@ -1266,7 +1252,7 @@ nodist_base_model_test_SOURCES = util/base_model.moc.cpp \
         util/locallistcacheloader.moc.cpp
 
 base_model_test_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC $(CXXFLAGS_qt)
-base_model_test_LDADD = $(QT5_PLUGINS_LIBS) $(QT_LIBS) $(LIBS_qt)
+base_model_test_LDADD = $(QT_LIBS) $(LIBS_qt)
 check_PROGRAMS = base_model_test
 TESTS = base_model_test
 


=====================================
modules/gui/qt/meson.build
=====================================
@@ -619,7 +619,6 @@ if qt6_dep.found()
 
     if host_system == 'windows'
         qt_cppargs += libcom_cppflags
-        qt_extra_flags += '-DQPNI_HEADER=<' + qt6_dep.version() + '/QtGui/qpa/qplatformnativeinterface.h>'
     endif
 
     if not (host_system in ['windows', 'darwin'])


=====================================
modules/gui/qt/private-core.pro
=====================================
@@ -0,0 +1,3 @@
+QT = core core-private
+CONFIG -= debug_and_release
+CONFIG += no_include_pwd


=====================================
modules/gui/qt/private-gui.pro
=====================================
@@ -0,0 +1,3 @@
+QT = gui gui-private
+CONFIG -= debug_and_release
+CONFIG += no_include_pwd


=====================================
modules/gui/qt/private-quick.pro
=====================================
@@ -0,0 +1,3 @@
+QT = quick quick-private
+CONFIG -= debug_and_release
+CONFIG += no_include_pwd


=====================================
modules/gui/qt/qt6.pro
=====================================
@@ -0,0 +1,23 @@
+TEMPLATE = app
+
+QT = core gui qml svg quick widgets quickcontrols2
+QTPLUGIN = qsvgicon qsvg qjpeg qico
+
+CONFIG -= entrypoint
+CONFIG -= debug_and_release
+CONFIG += no_include_pwd
+
+win32 {
+QTPLUGIN += qwindows qmodernwindowsstyle
+}
+
+linux {
+QTPLUGIN += qxcb-glx-integration qxcb-egl-integration qxcb qwayland-generic qwayland-egl qgtk3 qxdgdesktopportal xdg-shell
+}
+
+macx {
+QTPLUGIN += qcocoa qmacstyle
+}
+
+# These are not needed now, but may be required in the future:
+# CONFIG += import_plugins staticlib create_pc create_prl no_install_prl link_prl


=====================================
modules/gui/qt/quicktest.pro
=====================================
@@ -0,0 +1,3 @@
+QT = qmltest
+CONFIG -= debug_and_release
+CONFIG += no_include_pwd


=====================================
modules/gui/qt/wayland.pro
=====================================
@@ -0,0 +1,4 @@
+QT = waylandcompositor
+CONFIG += wayland-scanner
+CONFIG -= debug_and_release
+CONFIG += no_include_pwd



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f55efcc5939725f4610cd07ecb8af65ff528bc7d...502824e383373ff90e15d0680fcab5a250dca5eb

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f55efcc5939725f4610cd07ecb8af65ff528bc7d...502824e383373ff90e15d0680fcab5a250dca5eb
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