summaryrefslogtreecommitdiffstats
path: root/cmake/QtFinishPrlFile.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-06-16 10:39:01 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-06-16 17:56:35 +0200
commit4ab54320817ebbb465af343514d21139a654aed3 (patch)
treeabcbe92ab74281363c563d90f8e25b3a66a30d5f /cmake/QtFinishPrlFile.cmake
parentbd2a14ff9897b8bda0e9bd21f8472b1a5a7dd6f6 (diff)
CMake: Write object libs of Qt resources to .prl files
Since commit e343affd634 we're creating object libraries for Qt resources in static libraries. Those must be reflected in the generated .prl files for static builds of Qt. In qt_add_resource, we now calculate the install locations of the object files of rcc-generated C++ files and save them in the target property QT_RCC_OBJECTS. This property is then passed to QtFinishPrlFile to write the object file paths to the .prl file. Change-Id: Ic383892d723d02fc91f712bc2dbcbc90babad074 Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtFinishPrlFile.cmake')
-rw-r--r--cmake/QtFinishPrlFile.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake
index c7c913d4ae..4927761674 100644
--- a/cmake/QtFinishPrlFile.cmake
+++ b/cmake/QtFinishPrlFile.cmake
@@ -26,7 +26,9 @@ endfunction()
file(STRINGS "${IN_FILE}" lines)
set(content "")
foreach(line ${lines})
- if(line MATCHES "^QMAKE_PRL_LIBS_FOR_CMAKE = (.*)")
+ if(line MATCHES "^RCC_OBJECTS = (.*)")
+ set(rcc_objects ${CMAKE_MATCH_1})
+ elseif(line MATCHES "^QMAKE_PRL_LIBS_FOR_CMAKE = (.*)")
unset(adjusted_libs)
foreach(lib ${CMAKE_MATCH_1})
if("${lib}" STREQUAL "")
@@ -47,6 +49,9 @@ foreach(line ${lines})
list(APPEND adjusted_libs "${lib}")
endif()
endforeach()
+ if(rcc_objects)
+ list(APPEND adjusted_libs ${rcc_objects})
+ endif()
list(JOIN adjusted_libs " " adjusted_libs_for_qmake)
string(APPEND content "QMAKE_PRL_LIBS = ${adjusted_libs_for_qmake}\n")
string(APPEND content "QMAKE_PRL_LIBS_FOR_CMAKE = ${adjusted_libs}\n")