Qt5Test is only needed for running the regression tests.

--- CMakeLists.txt.orig	2018-12-21 05:40:14 UTC
+++ CMakeLists.txt
@@ -223,7 +223,9 @@ if(_qt5Dir)
     set(Qt5Xml_DIR "${_qt5Dir}/lib/cmake/Qt5Xml")
     set(Qt5Multimedia_DIR "${_qt5Dir}/lib/cmake/Qt5Multimedia")
     set(Qt5LinguistTools_DIR "${_qt5Dir}/lib/cmake/Qt5LinguistTools")
-    set(Qt5Test_DIR "${_qt5Dir}/lib/cmake/Qt5Test")
+    if (BUILD_TEST_APP)
+      set(Qt5Test_DIR "${_qt5Dir}/lib/cmake/Qt5Test")
+    endif()
     if(WITH_DBUS)
       set(Qt5DBus_DIR "${_qt5Dir}/lib/cmake/Qt5DBus")
     endif()
@@ -240,7 +242,10 @@ else()
   find_package(Qt5Core)
 endif()
 if(Qt5Core_FOUND)
-  set(_qtComponents Core Gui Widgets Network Xml Multimedia LinguistTools Test)
+  set(_qtComponents Core Gui Widgets Network Xml Multimedia LinguistTools)
+  if(BUILD_TEST_APP)
+    set(_qtComponents ${_qtComponents} Test)
+  endif()
   if(WITH_DBUS)
     set(_qtComponents ${_qtComponents} DBus)
   endif()
