Test the cmake multimediawidgets module only if widgets is available.
authorStephen Kelly <stephen.kelly@kdab.com>
Thu, 14 Mar 2013 13:16:12 +0000 (14:16 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 14 Mar 2013 18:33:59 +0000 (19:33 +0100)
Change-Id: I381e1b0883fb4fdc68627848ee39a26ce22e2ba5
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
tests/auto/cmake/CMakeLists.txt

index 5d23068..a634b9d 100644 (file)
@@ -9,7 +9,16 @@ find_package(Qt5Core REQUIRED)
 
 include("${_Qt5CTestMacros}")
 
+set(qt_module_includes
+    Multimedia QCamera
+)
+
+if (NOT NO_WIDGETS)
+    list(APPEND qt_module_includes
+        MultimediaWidgets QVideoWidget
+    )
+endif()
+
 test_module_includes(
-  Multimedia QCamera
-  MultimediaWidgets QVideoWidget
+    ${qt_module_includes}
 )