aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-01-07 09:52:41 +0100
committerLiang Qi <liang.qi@qt.io>2020-01-07 09:36:55 +0000
commit76b80e5e6f78b8aeac22659f785404c1e6fb3f17 (patch)
tree707a92e995d8f1d180ce2ba665e933d88ef8232c
parentbb1450c1a8de564df88b9a2aae33b8f73a256d9b (diff)
Fix include paths of QmlDevTools[Private] for framework builds
Change-Id: Ifd0d1751f3532773e9258189d4a2e930a41b7625 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
-rw-r--r--src/qmldevtools/CMakeLists.txt41
1 files changed, 30 insertions, 11 deletions
diff --git a/src/qmldevtools/CMakeLists.txt b/src/qmldevtools/CMakeLists.txt
index d7db2378ee..846e511703 100644
--- a/src/qmldevtools/CMakeLists.txt
+++ b/src/qmldevtools/CMakeLists.txt
@@ -59,19 +59,38 @@ qt_process_qlalr(QmlDevTools "${CMAKE_CURRENT_SOURCE_DIR}/../qml/parser/qqmljs.g
# for other tools, and also for the main QmlDevTools module,
# until we fix the script to handle internal_module to create only one single Private module.
qt_internal_module_info(qml_module "Qml")
-set(_qml_dev_tools_private_includes
- $<BUILD_INTERFACE:${qml_module_include_dir}>
- $<BUILD_INTERFACE:${qml_module_repo_include_dir}>
- $<BUILD_INTERFACE:${qml_module_include_dir}/${PROJECT_VERSION}>
- $<BUILD_INTERFACE:${qml_module_include_dir}/${PROJECT_VERSION}/${qml_module}>
- )
+if(QT_FEATURE_framework)
+ get_target_property(_qml_fw_headers_dir Qt::Qml LIBRARY_OUTPUT_DIRECTORY)
+ string(APPEND _qml_fw_headers_dir /${qml_module}.framework/Versions/${PROJECT_VERSION_MAJOR}/Headers)
+ set(_qml_dev_tools_private_includes
+ $<BUILD_INTERFACE:${_qml_fw_headers_dir}>
+ $<BUILD_INTERFACE:${_qml_fw_headers_dir}/${PROJECT_VERSION}>
+ $<BUILD_INTERFACE:${_qml_fw_headers_dir}/${PROJECT_VERSION}/${qml_module}>
+ )
+else()
+ set(_qml_dev_tools_private_includes
+ $<BUILD_INTERFACE:${qml_module_include_dir}>
+ $<BUILD_INTERFACE:${qml_module_repo_include_dir}>
+ $<BUILD_INTERFACE:${qml_module_include_dir}/${PROJECT_VERSION}>
+ $<BUILD_INTERFACE:${qml_module_include_dir}/${PROJECT_VERSION}/${qml_module}>
+ )
+endif()
target_include_directories(QmlDevTools PRIVATE ${_qml_dev_tools_private_includes})
target_include_directories(QmlDevToolsPrivate INTERFACE ${_qml_dev_tools_private_includes})
-set(_qml_dev_tools_public_includes
- $<INSTALL_INTERFACE:include/${qml_module}>
- $<INSTALL_INTERFACE:include/${qml_module}/${PROJECT_VERSION}>
- $<INSTALL_INTERFACE:include/${qml_module}/${PROJECT_VERSION}/${qml_module}>
- )
+if(QT_FEATURE_framework)
+ set(_qml_fw_headers_dir lib/${qml_module}.framework/Headers)
+ set(_qml_dev_tools_public_includes
+ $<INSTALL_INTERFACE:${_qml_fw_headers_dir}>
+ $<INSTALL_INTERFACE:${_qml_fw_headers_dir}/${PROJECT_VERSION}>
+ $<INSTALL_INTERFACE:${_qml_fw_headers_dir}/${PROJECT_VERSION}/${qml_module}>
+ )
+else()
+ set(_qml_dev_tools_public_includes
+ $<INSTALL_INTERFACE:include/${qml_module}>
+ $<INSTALL_INTERFACE:include/${qml_module}/${PROJECT_VERSION}>
+ $<INSTALL_INTERFACE:include/${qml_module}/${PROJECT_VERSION}/${qml_module}>
+ )
+endif()
target_include_directories(QmlDevTools PRIVATE ${_qml_dev_tools_public_includes})
target_include_directories(QmlDevToolsPrivate INTERFACE ${_qml_dev_tools_public_includes})