Skip to content

Commit d7a14af

Browse files
committed
Allow to specify QT_IMPORTS_DIR
1 parent 207d03e commit d7a14af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ find_package(Qt5LinguistTools REQUIRED)
7777

7878
# find qt5 imports dir
7979
get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION)
80-
exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" RETURN_VALUE return_code OUTPUT_VARIABLE QT_IMPORTS_DIR)
80+
if(NOT QT_IMPORTS_DIR)
81+
exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" RETURN_VALUE return_code OUTPUT_VARIABLE QT_IMPORTS_DIR)
82+
endif()
8183

8284
# Set components version
8385
set(COMPONENTS_VERSION 2.0)

0 commit comments

Comments
 (0)