Fix Qt Quick Compiler with CMake on Windows

We perform a qmake substitution pass on QtQuickCompilerCompiler.cmake.in,
which contains code to determine the location of the qmlcachegen tool.
The expression

    set(compiler_path \"$${CMAKE_BIN_DIR}qmlcachegen$$CMAKE_BIN_SUFFIX\")

requires that $$CMAKE_BIN_SUFFIX is set correctly, so that it expands to
.exe on Windows and we can locate the binary correctly. This is
identical to what's done in create_cmake.prf.

[ChangeLog][Qml] Fix Qt Quick Compiler with CMake on Windows

Task-number: QTBUG-71829
Change-Id: I81a7452b7dc7f01c9114900b9c103122fec07cf6
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
This commit is contained in:
Simon Hausmann 2018-11-27 10:00:10 +01:00
parent 5246b91077
commit ba9d630c3d
1 changed files with 1 additions and 0 deletions

View File

@ -24,6 +24,7 @@ contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
load(qt_build_paths)
equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe"
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