[vlc-commits] [Git][videolan/vlc][master] configure: use the native qmake

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Apr 3 13:35:13 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
af826f4a by Steve Lhomme at 2024-04-03T15:10:28+02:00
configure: use the native qmake

The target qmake uses the native qmake with this extra parameter.
And add some extra logs.

We don't want to rebuild the target qmake (and the whole Qt) just to get this
script.

- - - - -


2 changed files:

- buildsystem/check_qml_module.py
- configure.ac


Changes:

=====================================
buildsystem/check_qml_module.py
=====================================
@@ -77,13 +77,13 @@ class QmlModuleChecker:
         return ret
 
 
-    def getInstallInfo(self, qmake):
+    def getInstallInfo(self, qmake, qtconf):
         if not os.path.isfile(qmake):
             print("qmake not found")
             return False
 
         ret = subprocess.run(
-            [ qmake, "-query"],
+            [ qmake, "-qtconf", qtconf, "-query"],
             capture_output=True,
             encoding="utf8"
         )
@@ -140,7 +140,11 @@ def main():
     parser = argparse.ArgumentParser("check for qml runtime dependencies")
     parser.add_argument(
         "--qmake", type=str, required=True,
-        help="qmake path")
+        help="native qmake path")
+
+    parser.add_argument(
+        "--qtconf", type=str, required=True,
+        help="qmake qtconf path")
 
     parser.add_argument(
         "--modules", nargs="+", action=KeyValue, required=True,
@@ -149,7 +153,7 @@ def main():
     args = parser.parse_args()
 
     moduleChecker = QmlModuleChecker()
-    if not moduleChecker.getInstallInfo(args.qmake):
+    if not moduleChecker.getInstallInfo(args.qmake, args.qtconf):
         exit(-1)
 
     with NamedTemporaryFile(mode="w+", suffix=".qml") as f:


=====================================
configure.ac
=====================================
@@ -4013,7 +4013,6 @@ AS_IF([test "${enable_qt}" != "no"], [
           have_qt_wayland="yes"
       ],[:])
 
-      QT_BIN_DIRECTORY="$(eval $PKG_CONFIG --variable=bindir Qt6Core)"
       QT_LIBEXEC_DIRECTORY="$(eval $PKG_CONFIG --variable=libexecdir Qt6Core)"
       QT_INCLUDE_DIRECTORY="$(eval $PKG_CONFIG --variable=includedir Qt6Core)"
       QT_LIB_DIRECTORY="$(eval $PKG_CONFIG --variable=libdir Qt6Core)"
@@ -4027,13 +4026,13 @@ AS_IF([test "${enable_qt}" != "no"], [
 
       dnl check native in contribs and keep the full path if found there
       AC_MSG_CHECKING([if contribs provide qmake])
-      AS_IF([test -x "${CONTRIB_DIR}/qmake${BUILDEXEEXT}"], [
-        QMAKE="${CONTRIB_DIR}/qmake${BUILDEXEEXT}"
+      AS_IF([test -x "${CONTRIB_DIR}/../bin/qmake${BUILDEXEEXT}"], [
+        QMAKE="${CONTRIB_DIR}/../bin/qmake${BUILDEXEEXT}"
         AC_MSG_RESULT([yes])
       ],[
         AC_MSG_RESULT([no])
       ])
-      AC_PATH_PROGS(QMAKE, [qmake], qmake, ["${QT_BIN_DIRECTORY}"])
+      AC_CHECK_TOOL(QMAKE, [qmake], [false])
       AC_MSG_CHECKING([if contribs provide moc])
       AS_IF([test -x "${CONTRIB_DIR}/../libexec/moc${BUILDEXEEXT}"], [
         MOC="${CONTRIB_DIR}/../libexec/moc${BUILDEXEEXT}"
@@ -4080,22 +4079,29 @@ AS_IF([test "${enable_qt}" != "no"], [
       ])
 
       AC_CHECK_PROGS(PYTHON3, [python3], [no])
+      AC_MSG_CHECKING([if required Qt plugins are installed with ${QMAKE}])
       AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py \
             --qmake "${QMAKE}" \
+            --qtconf "${CONTRIB_DIR}/bin/target_qt.conf" \
             --modules \
             QtQml.Models="" \
             QtQml.WorkerScript="" \
             QtQuick.Layouts="" \
             QtQuick.Window="" \
             QtQuick.Controls="" \
-            Qt5Compat.GraphicalEffects=""],
-      [],[
-          AC_MSG_WARN([qt runtime dependencies are missing, disabling qt interface])
-          enable_qt="no"
+            Qt5Compat.GraphicalEffects=""], [
+        AC_MSG_RESULT([yes])
+      ],[
+        AC_MSG_RESULT([no])
+        AC_MSG_WARN([qt runtime dependencies are missing, disabling qt interface])
+        enable_qt="no"
       ])
 
       PKG_CHECK_MODULES([QT_QUICK_TEST], [Qt6QuickTest >= ${QT_MINIMUM_VERSION}], [
-          AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py --qmake "${QMAKE}" --modules QtTest=""], [
+          AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py \
+            --qmake "${QMAKE}" \
+            --qtconf "${CONTRIB_DIR}/bin/target_qt.conf" \
+            --modules QtTest=""], [
               have_qt_quick_test="yes"
           ], [])
       ],[



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/af826f4a02b31dabe0ab05d50e9a5c17555c4fe6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/af826f4a02b31dabe0ab05d50e9a5c17555c4fe6
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