summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-05-11 14:51:33 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-05-11 15:04:44 +0200
commita1ccedeb440216dce87fad01746935a89fd8715e (patch)
tree28ad3766a190f7899294b37d155ff0651b042ec1 /src
parentb56ed4da746e0b1f1b4f4e9fba6b857a3e050399 (diff)
CMake: Workaround fix for failing RC file generation on Windows
For some reason the Help target doesn't get its RC file generated when building qttools, which leads to a build failure. We don't quite know yet why all this is happening, but a workaround fix seems to be to use an OBJECT library instead of an INTERFACE library to propagate the generated RC file. Amends 657fa0462d552110e2ba14bcac46275e6066993f Fixes: QTBUG-84155 Change-Id: I1e1c2f3b05bae2ed009020d031c6510a517c01ec Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt6CoreMacros.cmake3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake
index 9dade2edbd..e5c40e9243 100644
--- a/src/corelib/Qt6CoreMacros.cmake
+++ b/src/corelib/Qt6CoreMacros.cmake
@@ -969,8 +969,7 @@ END
# We would like to do the following:
# target_sources(${target} PRIVATE "$<$<CONFIG:${cfg}>:${output}>")
# However, https://gitlab.kitware.com/cmake/cmake/-/issues/20682 doesn't let us.
- add_library(${target}_${cfg}_rc INTERFACE)
- target_sources(${target}_${cfg}_rc INTERFACE "${output}")
+ add_library(${target}_${cfg}_rc OBJECT "${output}")
target_link_libraries(${target} PRIVATE "$<$<CONFIG:${cfg}>:${target}_${cfg}_rc>")
endwhile()
endif()