aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMQueryQt.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ECMQueryQt.cmake')
-rw-r--r--modules/ECMQueryQt.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/ECMQueryQt.cmake b/modules/ECMQueryQt.cmake
index f4e3bf7c..a6b5a163 100644
--- a/modules/ECMQueryQt.cmake
+++ b/modules/ECMQueryQt.cmake
@@ -56,8 +56,10 @@ elseif(QT_MAJOR_VERSION STREQUAL "6")
find_program(_qtpaths_executable NAMES qtpaths6)
if(NOT _qtpaths_executable)
enable_language(CXX)
- find_package(Qt6 COMPONENTS CoreTools REQUIRED CONFIG)
- get_target_property(_qtpaths_executable Qt6::qtpaths LOCATION)
+ find_package(Qt6 COMPONENTS CoreTools QUIET CONFIG)
+ if (TARGET Qt6::qtpaths)
+ get_target_property(_qtpaths_executable Qt6::qtpaths LOCATION)
+ endif()
endif()
set(QUERY_EXECUTABLE ${_qtpaths_executable}
CACHE FILEPATH "Location of the Qt6 qtpaths executable")