summaryrefslogtreecommitdiffstats
path: root/cmake/QtModuleHelpers.cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-05-26 20:48:58 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-05-31 20:50:07 +0200
commit4333bfd9d8395705bae900ba0b5ab6b44bacb9a4 (patch)
tree1c3bf023b52cd17430e5b36bfaf6e64a71943a64 /cmake/QtModuleHelpers.cmake
parenta1fd4f51ada82854f35654158a334454e760a9f7 (diff)
Move the framework related information to the common function
Since the information about framework is performed in multiple places it's quite hard to control its consistency. This moves the obtaining of framework related information to the common function and adjusts the use of the information across the repo. Change-Id: I1f488d41dcea75a1e8c361926792a6b7c45e5a3f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtModuleHelpers.cmake')
-rw-r--r--cmake/QtModuleHelpers.cmake21
1 files changed, 12 insertions, 9 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 6beb281f82..8193c51b4e 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -387,19 +387,22 @@ function(qt_internal_add_module target)
endif()
if(is_framework)
- set(fw_bundle_subdir "${INSTALL_LIBDIR}/Qt${target}.framework")
+ qt_internal_get_framework_info(fw ${target})
+ set(fw_install_dir "${INSTALL_LIBDIR}/${fw_dir}")
+ set(fw_install_header_dir "${INSTALL_LIBDIR}/${fw_header_dir}")
+ set(fw_output_header_dir "${QT_BUILD_DIR}/${fw_install_header_dir}")
list(APPEND public_includes
# Add the lib/Foo.framework dir as include path to let CMake generate
# the -F compiler flag for framework-style includes to work.
- "$<INSTALL_INTERFACE:${fw_bundle_subdir}>"
+ "$<INSTALL_INTERFACE:${fw_install_dir}>"
# Add the framework Headers subdir, so that non-framework-style includes work. The
# BUILD_INTERFACE Headers symlink was previously claimed not to exist at the relevant
# time, and a fully specified Header path was used instead. This doesn't seem to be a
# problem anymore.
- "$<BUILD_INTERFACE:${QT_BUILD_DIR}/${fw_bundle_subdir}/Headers>"
- "$<INSTALL_INTERFACE:${fw_bundle_subdir}/Headers>"
- )
+ "$<BUILD_INTERFACE:${fw_output_header_dir}>"
+ "$<INSTALL_INTERFACE:${fw_install_header_dir}>"
+ )
endif()
if(NOT arg_NO_MODULE_HEADERS AND NOT arg_NO_SYNC_QT)
@@ -696,11 +699,11 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
"$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
if(is_framework)
- set(fw_headers_dir
- "${INSTALL_LIBDIR}/Qt${target}.framework/Headers/")
+ qt_internal_get_framework_info(fw ${target})
+ set(fw_install_private_header_dir "${INSTALL_LIBDIR}/${fw_private_header_dir}")
list(APPEND interface_includes
- "$<INSTALL_INTERFACE:${fw_headers_dir}${PROJECT_VERSION}>"
- "$<INSTALL_INTERFACE:${fw_headers_dir}${PROJECT_VERSION}/${module}>")
+ "$<INSTALL_INTERFACE:${fw_install_private_header_dir}>"
+ "$<INSTALL_INTERFACE:${fw_install_private_header_dir}/${module}>")
else()
list(APPEND interface_includes
"$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}>"