diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-05-16 09:46:29 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-05-16 09:04:00 +0000 |
commit | 9fade925e36651c3d746a71ec312535f6922035a (patch) | |
tree | cd077f3687934c41e7e40febb21732b1a4e932c7 /cmake | |
parent | 4dacc099213acf804b50c6e9a9afba5fda8b8e3b (diff) |
Stop trying to create config forwarding headers for NO_MODULE targets
The GlobalConfig target is not an actual module, so there's no point
in trying to create forwarding headers for GlobalConfig's qconfig.h
within qt_feature_module_end.
qconfig.h's forwarding header will be created implicitly while
processing QtCore target's SYNCQT.INJECTIONS value, which is read
from the headers.pri file generated by syncqt.
This also fixes trying to create forwarding headers when processing
the sqldrivers project.
Amends 02a015375a639a4d27d19bbf435f20b725696768.
Change-Id: Ifd70d8c3ebf881ffdcf90db8d5d3b23309bc8fed
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBaseGlobalTargets.cmake | 2 | ||||
-rw-r--r-- | cmake/QtFeature.cmake | 22 |
2 files changed, 14 insertions, 10 deletions
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake index 7bb4795d35..7bb55ba3d9 100644 --- a/cmake/QtBaseGlobalTargets.cmake +++ b/cmake/QtBaseGlobalTargets.cmake @@ -63,7 +63,7 @@ target_include_directories(GlobalConfig INTERFACE $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/QtCore> ) -qt_feature_module_begin(LIBRARY Core +qt_feature_module_begin(NO_MODULE PUBLIC_FILE src/corelib/global/qconfig.h PRIVATE_FILE src/corelib/global/qconfig_p.h ) diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake index 50c672d08c..6c6c2eedbb 100644 --- a/cmake/QtFeature.cmake +++ b/cmake/QtFeature.cmake @@ -397,15 +397,19 @@ function(qt_feature_module_end) # Extra header injections which have to have forwarding headers created by # qt_install_injections. - set(injections "") - qt_compute_injection_forwarding_header("${__QtFeature_library}" - SOURCE "${__QtFeature_public_file}" - OUT_VAR injections) - qt_compute_injection_forwarding_header("${__QtFeature_library}" - SOURCE "${__QtFeature_private_file}" PRIVATE - OUT_VAR injections) - - set(${arg_OUT_VAR_PREFIX}extra_library_injections ${injections} PARENT_SCOPE) + # Skip creating forwarding headers if qt_feature_module_begin was called with NO_MODULE, aka + # there is no include/<module_name> so there's no place to put the forwarding headers. + if(__QtFeature_library) + set(injections "") + qt_compute_injection_forwarding_header("${__QtFeature_library}" + SOURCE "${__QtFeature_public_file}" + OUT_VAR injections) + qt_compute_injection_forwarding_header("${__QtFeature_library}" + SOURCE "${__QtFeature_private_file}" PRIVATE + OUT_VAR injections) + + set(${arg_OUT_VAR_PREFIX}extra_library_injections ${injections} PARENT_SCOPE) + endif() if (NOT ("${target}" STREQUAL "NO_MODULE")) get_target_property(targetType "${target}" TYPE) |