aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-09-01 10:43:54 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-09-02 10:57:11 +0200
commite458e4cfd526c6e3288ae08ec4b25fe240e55080 (patch)
treed5ac6cec871f018d0e0f37b04df4b2ce0c2a3214 /src
parentedb3d1ff7909945113274f3ed2a3bbe1b8f1273c (diff)
Fix include directories for QmlCompiler
QmlDevTools does not have a proper master include in a developer build (at least). Therefore, we cannot directly depend on it when building QmlCompiler. However, as both are static libraries, we can just inject the include directories of QmlDevTools into QmlCompiler, and make targets that use QmlCompiler depend on QmlDevTools explicitly. This only applies to 6.2 as we don't use QmlDevTools in dev anymore. Change-Id: Ie7a8759495982a18a42a714d9123307e008485f5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qmlcompiler/CMakeLists.txt13
-rw-r--r--src/qmldevtools/CMakeLists.txt4
2 files changed, 8 insertions, 9 deletions
diff --git a/src/qmlcompiler/CMakeLists.txt b/src/qmlcompiler/CMakeLists.txt
index 311652cca7..a853eea59b 100644
--- a/src/qmlcompiler/CMakeLists.txt
+++ b/src/qmlcompiler/CMakeLists.txt
@@ -1,9 +1,3 @@
-# Generated from qmlcompiler.pro.
-
-#####################################################################
-## QmlCompilerPrivate Module:
-#####################################################################
-
qt_internal_add_module(QmlCompilerPrivate
STATIC
INTERNAL_MODULE
@@ -25,8 +19,9 @@ qt_internal_add_module(QmlCompilerPrivate
qqmljsannotation_p.h qqmljsannotation.cpp
PUBLIC_LIBRARIES
Qt::CorePrivate
- Qt::QmlDevToolsPrivate
)
-#### Keys ignored in scope 1:.:.:qmlcompiler.pro:<TRUE>:
-# _OPTION = "host_build"
+add_dependencies(QmlCompilerPrivate QmlDevToolsPrivate)
+get_target_property(devtools_includes QmlDevToolsPrivate EXTRA_INCLUDE_DIRECTORIES)
+target_include_directories(QmlCompilerPrivate PUBLIC ${devtools_includes})
+target_compile_definitions(QmlCompilerPrivate PUBLIC QT_QMLDEVTOOLS_LIB)
diff --git a/src/qmldevtools/CMakeLists.txt b/src/qmldevtools/CMakeLists.txt
index abe12adfe5..f518812ad0 100644
--- a/src/qmldevtools/CMakeLists.txt
+++ b/src/qmldevtools/CMakeLists.txt
@@ -90,6 +90,10 @@ else()
endif()
target_include_directories(QmlDevToolsPrivate PUBLIC ${_qml_dev_tools_public_includes})
+set_target_properties(QmlDevToolsPrivate
+ PROPERTIES EXTRA_INCLUDE_DIRECTORIES
+ "${_qml_dev_tools_public_includes}${_qml_dev_tools_private_includes}"
+)
# We build the qlalr sources into qmldevtools, so there's no link-time
# dependency to QtQml. However we also include files in QmlDevToolsPrivate such
# as qqmlirbuilder.cpp that include <private/qqmljsgrammar_p.h> that