summaryrefslogtreecommitdiffstats
path: root/cmake/QtModuleHelpers.cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-06-01 11:25:41 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-06-03 12:55:02 +0200
commit169a248fdfab6cd5d35fde85e851b3ad235590b7 (patch)
tree10d7907503246939d0d21b6a28f6d51959900db8 /cmake/QtModuleHelpers.cmake
parenta25027eecb3829a65543d0e8ab00c74e1b1a21c5 (diff)
Make framework names consistent with the module names
For Apple's frameworks it's possible to include header files using the following assumption: If the framework name is "MyFramework" then '#include <MyFramework/frameworkheader.h>' will work without specifying the include path explicitly. This is broken for internal modules since they use the framework name with the 'Private' suffix. This uses the module name instead of the target name as a framework name. Amends edbe0eb335ca4c0fde23f57eae5acdf80937c9e3 Task-number: QTBUG-87775 Change-Id: I0592a28d0768724b6e10ca81aa7cefb0a3699a5e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtModuleHelpers.cmake')
-rw-r--r--cmake/QtModuleHelpers.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 8193c51b4e..b882a72154 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -153,10 +153,11 @@ function(qt_internal_add_module target)
set_target_properties(${target} PROPERTIES
FRAMEWORK TRUE
FRAMEWORK_VERSION "A" # Not based on Qt major version
- MACOSX_FRAMEWORK_IDENTIFIER org.qt-project.Qt${target}
+ MACOSX_FRAMEWORK_IDENTIFIER org.qt-project.${module}
MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
+ qt_internal_get_framework_info(fw ${target})
endif()
if(QT_FEATURE_reduce_relocations AND UNIX AND NOT is_interface_lib)
@@ -246,7 +247,7 @@ function(qt_internal_add_module target)
endif()
if(is_framework)
set_target_properties(${target} PROPERTIES
- OUTPUT_NAME Qt${target}
+ OUTPUT_NAME ${fw_name}
)
else()
set_target_properties(${target} PROPERTIES
@@ -387,7 +388,6 @@ function(qt_internal_add_module target)
endif()
if(is_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}")
@@ -699,11 +699,11 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
"$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
if(is_framework)
- qt_internal_get_framework_info(fw ${target})
set(fw_install_private_header_dir "${INSTALL_LIBDIR}/${fw_private_header_dir}")
+ set(fw_install_private_module_header_dir "${INSTALL_LIBDIR}/${fw_private_module_header_dir}")
list(APPEND interface_includes
"$<INSTALL_INTERFACE:${fw_install_private_header_dir}>"
- "$<INSTALL_INTERFACE:${fw_install_private_header_dir}/${module}>")
+ "$<INSTALL_INTERFACE:${fw_install_private_module_header_dir}>")
else()
list(APPEND interface_includes
"$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}>"