diff options
| author | Ahmad Samir <a.samirh78@gmail.com> | 2022-03-28 15:11:59 +0200 | 
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2022-03-28 15:11:59 +0200 | 
| commit | 498d9da89690d0c317e159bd31f682a003187641 (patch) | |
| tree | dd2193394ca91eb42317d40bc0c603a0ddcd20ca | |
| parent | 19311d26a6142cf6722d64834133664c68ac5865 (diff) | |
| download | extra-cmake-modules-498d9da89690d0c317e159bd31f682a003187641.tar.gz extra-cmake-modules-498d9da89690d0c317e159bd31f682a003187641.tar.bz2 | |
ECMQueryQt: don't fail when TRY is used
Like is done in the Qt5 qmake code path.
| -rw-r--r-- | modules/ECMQueryQt.cmake | 6 | 
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") | 
