summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt5CoreMacros.cmake
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-05-20 11:37:27 +0200
committerLiang Qi <liang.qi@qt.io>2019-05-20 12:49:37 +0200
commit7029ecade96876d08af7d576e0b81417502acbaa (patch)
tree9b70980a119b9ecc9a8e69cd777d5c79a219319d /src/corelib/Qt5CoreMacros.cmake
parent68866b1a7bcade79e425f609fc1680203b89112e (diff)
cmake: correct version dependency for qt5_add_big_resources
qt5_add_big_resources is only available if using CMake 3.9 and later. This amends cdccd0222bbed1954d5d7fe0da9d2308c202f3b1. Task-number: QTBUG-55680 Task-number: QTBUG-75806 Change-Id: Ibba7af6ee7edfb226368937d543b7ec5cc93eb16 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/corelib/Qt5CoreMacros.cmake')
-rw-r--r--src/corelib/Qt5CoreMacros.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index 7ae5e4fd16..3a60b8e0d2 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -296,6 +296,9 @@ endfunction()
# qt5_add_big_resources(outfiles inputfile ... )
function(QT5_ADD_BIG_RESOURCES outfiles )
+ if (CMAKE_VERSION VERSION_LESS 3.9)
+ message(FATAL_ERROR, "qt5_add_big_resources requires CMake 3.9 or newer")
+ endif()
set(options)
set(oneValueArgs)
@@ -326,6 +329,8 @@ function(QT5_ADD_BIG_RESOURCES outfiles )
set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOMOC OFF)
set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOUIC OFF)
add_dependencies(rcc_object_${outfilename} big_resources_${outfilename})
+ # The modification of TARGET_OBJECTS needs the following change in cmake
+ # https://gitlab.kitware.com/cmake/cmake/commit/93c89bc75ceee599ba7c08b8fe1ac5104942054f
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}