diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index 71bc61b9e861326816146cb3e23ff24a8e84aad6..33821e20bb7bd222760b8e1b6c9e839f2c2c2e09 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -3,6 +3,7 @@ TEMPLATE = subdirs
 SUBDIRS += \
     inspectorserver \
     publicapi \
-    qmltests \
     qquickwebengineview \
     qquickwebengineviewgraphics
+
+isQMLTestSupportApiEnabled(): SUBDIRS += qmltests