Skip to content

Commit

Permalink
ECMQueryQt: Provide better error message when Qt6 qpaths is not found
Browse files Browse the repository at this point in the history
Otherwise, we just say 'no executable found', without providing the name

See alex1701c/NordVPNKrunner#8
  • Loading branch information
alex1701c committed May 8, 2024
1 parent 30f066c commit 2527c05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ECMQueryQt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ endif()
if (QT_MAJOR_VERSION STREQUAL "5")
# QUIET to accommodate the TRY option
find_package(Qt${QT_MAJOR_VERSION}Core QUIET)
set(_exec_name_text "Qt5 qmake")
if(TARGET Qt5::qmake)
get_target_property(_qmake_executable_default Qt5::qmake LOCATION)

set(QUERY_EXECUTABLE ${_qmake_executable_default}
CACHE FILEPATH "Location of the Qt5 qmake executable")
set(_exec_name_text "Qt5 qmake")
set(_cli_option "-query")
endif()
elseif(QT_MAJOR_VERSION STREQUAL "6")
# QUIET to accommodate the TRY option
find_package(Qt6 COMPONENTS CoreTools QUIET CONFIG)
set(_exec_name_text "Qt6 qtpaths")
if (TARGET Qt6::qtpaths)
get_target_property(_qtpaths_executable Qt6::qtpaths LOCATION)

set(QUERY_EXECUTABLE ${_qtpaths_executable}
CACHE FILEPATH "Location of the Qt6 qtpaths executable")
set(_exec_name_text "Qt6 qtpaths")
set(_cli_option "--query")
endif()
endif()
Expand Down

0 comments on commit 2527c05

Please sign in to comment.