diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-26 16:23:02 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-03 07:45:21 +0000 |
commit | b262605c806a6572f31cf9a50aab7b0e10cbc951 (patch) | |
tree | 649b5c2468bb6a7e6a745ab284e921e5f909639d /tools/qmlcachegen/qmlcachegen.pro | |
parent | 32c33ee9abec1ef2f05233c3a613689431f6654b (diff) |
Fix qtquick_compiler_add_resources when cross-compiling
Attempt to locate the qmlcachegen binary in the host bin directory if
possible.
Task-number: QTBUG-68724
Change-Id: If0d28408a316b3dd33f4734464e0d5fe44c9fc2c
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools/qmlcachegen/qmlcachegen.pro')
-rw-r--r-- | tools/qmlcachegen/qmlcachegen.pro | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.pro b/tools/qmlcachegen/qmlcachegen.pro index 391f0c3889..9662690395 100644 --- a/tools/qmlcachegen/qmlcachegen.pro +++ b/tools/qmlcachegen/qmlcachegen.pro @@ -14,7 +14,21 @@ build_integration.path = $$[QT_HOST_DATA]/mkspecs/features prefix_build: INSTALLS += build_integration else: COPIES += build_integration -cmake_build_integration.files = Qt5QuickCompilerConfig.cmake +load(cmake_functions) + +CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX]) +contains(CMAKE_BIN_DIR, "^\\.\\./.*") { + CMAKE_BIN_DIR = $$[QT_HOST_BINS]/ + CMAKE_BIN_DIR_IS_ABSOLUTE = True +} + +load(qt_build_paths) + +cmake_config_file.input = $$PWD/Qt5QuickCompilerConfig.cmake.in +cmake_config_file.output = $$MODULE_BASE_OUTDIR/lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake +QMAKE_SUBSTITUTES += cmake_config_file + +cmake_build_integration.files = $$cmake_config_file.output cmake_build_integration.path = $$[QT_INSTALL_LIBS]/cmake/Qt5QuickCompiler prefix_build: INSTALLS += cmake_build_integration else: COPIES += cmake_build_integration |