summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-06-10 13:04:13 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-06-10 13:46:31 +0200
commitdde11715d357f95370850f5e4eebebcbe7964fb3 (patch)
treecef0784f7aeeff47897c343fc64f584d950ec523 /cmake
parentdc1dd51af3a35728235cb63a31b07ff76a652208 (diff)
CMake: Temporary workaround for static top-level Qt builds
Because find_package usually creates targets in a local scope, qt_generate_prl_file fails to generate a .prl file that has references to generator expressions like "$<TARGET_FILE:Freetype::Freetype>" which references targets that are not found in that specific scope (e.g Freetype target is present in qtbase scope, but not qtsvg scope). This happens in static top-level Qt builds, and thus fails the configuration. While we try to figure out how to fix this adequatly, don't generate .prl files in such a configuration. Task-number: QTBUG-84874 Change-Id: I69cf0ad1419d21e3676e1374624601f00936c405 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index fa977b1016..0a537ab4fa 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -2771,7 +2771,13 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
endfunction()
function(qt_finalize_module target)
- qt_generate_prl_file(${target})
+ # Workaround to allow successful configuration of static top-level Qt builds.
+ # See QTBUG-84874.
+ if(QT_SUPERBUILD AND NOT BUILD_SHARED_LIBS)
+ # Do nothing.
+ else()
+ qt_generate_prl_file(${target})
+ endif()
qt_generate_module_pri_file("${target}" ${ARGN})
endfunction()