Permit the use of qml cache file generation even inside qtdeclarative

After re-arranging subdirs, the cmake target level dependencies can
handle building qmlcachegen before running the custom command for
generating cache files.

Change-Id: I8a35b2b5bfd2fdf4b49462ff9c27e5f3075254fc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Simon Hausmann 2019-07-29 15:07:27 +02:00
parent 6887ae2ff9
commit c75dcc6875

View File

@ -1775,13 +1775,6 @@ function(add_qmlcachegen_target target)
return()
endif()
if ("${CMAKE_PROJECT_NAME}" STREQUAL "QtDeclarative"
AND NOT TARGET ${QT_CMAKE_EXPORT_NAMESPACE}::qmlcachegen)
# qmlcachegen is not available when building qtdeclarative since
# tools get built after source. We should not error in this case.
return()
endif()
if (NOT TARGET ${QT_CMAKE_EXPORT_NAMESPACE}::qmlcachegen)
message(FATAL_ERROR "Could not locate qmlcachegen tool. \
Please add QmlTools to your find_package command."