CMake: Fix dependency in qt_add_big_resources

Ensure that the second rcc pass is executed whenever the
object file changes.

Patch provided by Hongpeng Liu <lhpzwd@163.com>

Fixes: QTBUG-85186
Pick-to: 5.15
Change-Id: I6e52ec15048ab286efd85500ca535b2b8b01c270
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Kai Koehne 2020-07-06 19:31:28 +02:00
parent 986d89c2ee
commit 03de9a41da
2 changed files with 2 additions and 2 deletions

View File

@ -406,7 +406,7 @@ function(qt5_add_big_resources outfiles)
add_custom_command(OUTPUT ${outfile}
COMMAND ${Qt5Core_RCC_EXECUTABLE}
ARGS ${rcc_options} --name ${outfilename} --pass 2 --temp $<TARGET_OBJECTS:rcc_object_${outfilename}> --output ${outfile} ${infile}
DEPENDS rcc_object_${outfilename}
DEPENDS rcc_object_${outfilename} $<TARGET_OBJECTS:rcc_object_${outfilename}>
VERBATIM)
list(APPEND ${outfiles} ${outfile})
endforeach()

View File

@ -404,7 +404,7 @@ function(qt6_add_big_resources outfiles )
add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
ARGS ${rcc_options} --name ${outfilename} --pass 2 --temp $<TARGET_OBJECTS:rcc_object_${outfilename}> --output ${outfile} ${infile}
DEPENDS rcc_object_${outfilename} ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
DEPENDS rcc_object_${outfilename} $<TARGET_OBJECTS:rcc_object_${outfilename}> ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
VERBATIM)
list(APPEND ${outfiles} ${outfile})
endforeach()