|
1 | 1 | # Qt QML Tools |
2 | 2 | # ~~~~~~~~~~~~ |
3 | | -# |
| 3 | +# |
4 | 4 | # To generate qmltypes files required by Qt Creator to allow QML code inspection |
5 | 5 | # (http://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html#generating-qmltypes-files) |
6 | 6 | # we need to have installed qmlplugindump unity (shipped with Qt 4.8 and later) |
7 | 7 | # http://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html#dumping-plugins-automatically |
8 | 8 | # |
9 | | -# Find the installed version of qmlplugindump utility. |
| 9 | +# Find the installed version of qmlplugindump utility. |
10 | 10 | # FindQtQmlTools should be called after Qt5 has been found |
11 | 11 | # |
12 | 12 | # This file defines the following variables: |
|
15 | 15 | # QMLPLUGINDUMP_EXECUTABLE - Path to qmlplugindump executable |
16 | 16 | # |
17 | 17 | # Also defines MACRO to create qmltypes file, when QML directory is supplied |
18 | | -# |
| 18 | +# |
19 | 19 | # Copyright (c) 2017, Peter Petrik <zilolv at gmail dot com> |
20 | 20 | # Redistribution and use is allowed according to the terms of the BSD license. |
21 | 21 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
22 | 22 |
|
23 | 23 | MACRO(FIND_QMLPLUGINDUMP) |
| 24 | + get_filename_component(QT_BIN_DIR "${QT_QMAKE_EXECUTABLE}" DIRECTORY) |
| 25 | + |
24 | 26 | IF(NOT QMLPLUGINDUMP_EXECUTABLE) |
25 | 27 | IF (MSVC) |
26 | | - FIND_PROGRAM(QMLPLUGINDUMP_EXECUTABLE qmlplugindump.exe) |
| 28 | + FIND_PROGRAM(QMLPLUGINDUMP_EXECUTABLE qmlplugindump.exe PATHS ${QT_BIN_DIR} NO_DEFAULT_PATH) |
27 | 29 | ELSE (MSVC) |
28 | | - FIND_PROGRAM(QMLPLUGINDUMP_EXECUTABLE qmlplugindump) |
| 30 | + FIND_PROGRAM(QMLPLUGINDUMP_EXECUTABLE qmlplugindump PATHS ${QT_BIN_DIR} NO_DEFAULT_PATH) |
29 | 31 | ENDIF (MSVC) |
30 | 32 | ENDIF(NOT QMLPLUGINDUMP_EXECUTABLE) |
31 | | - |
| 33 | + |
32 | 34 | IF (QMLPLUGINDUMP_EXECUTABLE) |
33 | 35 | SET(QMLPLUGINDUMP_FOUND TRUE) |
34 | 36 | MESSAGE(STATUS "Found qmlplugindump: ${QMLPLUGINDUMP_EXECUTABLE}") |
|
0 commit comments