summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-03-20 15:07:28 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-03-23 09:55:00 +0100
commit7c04c5427f697bce5f2d7c7f0ae442962df07620 (patch)
tree5aa4faf9328147a0b64c5594a0975a258165f199 /cmake
parente510a4e32789327a49b0b2eeea3564bb502b881f (diff)
CMake: Fix creation of forwarding headers to be at configure time
qt_add_module checks for the existence of the following directory include/QtFoo/6.0.0/Foo when deciding whether a private module target should contain that path in its INTERFACE_INCLUDE_DIRECTORIES. There are 2 cases when it's created, when running syncqt, and inside qt_install_injections. If syncqt doesn't create it because there are no private headers (like in qttools/src/global), qt_install_injections created it at generation time (for injected configure headers like qttools-config_p.h) Unfortunately that caused the existence check mentioned above to fail, not exporting the path in the QtToolsPrivate's include directories, and failing the qttools build. To fix that, create the injection files (and directories) at configure time, using qt_configure_file instead of file(GENERATE). Change-Id: Idd9b6ec36e986c4de95d11557170e1c70927211c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 0455567208..43ee166ce9 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -1318,7 +1318,8 @@ function(qt_install_injections target build_dir install_dir)
"${lower_case_forwarding_header_path}"
"${current_repo_build_dir}/${file}")
set(main_contents "#include \"${relpath}\"")
- file(GENERATE OUTPUT "${lower_case_forwarding_header_path}/${original_file_name}"
+
+ qt_configure_file(OUTPUT "${lower_case_forwarding_header_path}/${original_file_name}"
CONTENT "${main_contents}")
if(is_framework)
@@ -1348,7 +1349,7 @@ function(qt_install_injections target build_dir install_dir)
endif()
# Generate upper case forwarding header like QVulkanFunctions or QtConfig.
- file(GENERATE OUTPUT "${build_dir}/${upper_case_forwarding_header_path}/${fwd_hdr}"
+ qt_configure_file(OUTPUT "${build_dir}/${upper_case_forwarding_header_path}/${fwd_hdr}"
CONTENT "#include \"${destinationname}\"\n")
if(is_framework)