Skip to content

Commit

Permalink
Use QT_MOC_EXECUTABLE to find qmake
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd authored Sep 23, 2023
1 parent 532ec1f commit 7f548cc
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions styleplugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,7 @@ set(SOUND_FILES
)

# Use Qt tools to get the installation directory
if(Qt${QT_VERSION}_DIR)
set(QT_QMAKE_EXECUTABLE "${Qt${QT_VERSION}_DIR}/bin/qmake")
else()
find_program(QT_QMAKE_EXECUTABLE qmake)
endif()

if(NOT QT_QMAKE_EXECUTABLE)
message(FATAL_ERROR "qmake is not found.")
endif()

execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS
execute_process(COMMAND ${QT_MOC_EXECUTABLE} -query QT_INSTALL_PLUGINS
OUTPUT_VARIABLE QT_PLUGINS_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
Expand Down

0 comments on commit 7f548cc

Please sign in to comment.