a6ccef651d
Due to generator expression it is impossible to recursively evaluate the link dependencies of a target. This is required by QtDeclarative's qmltyperegistrar. To overcome this we generate a ${target}_metatypes_dep.txt file which contain lines with the following pattern: ${PATH_TO_METATYPES.json}=${PATH_TO_METATYPES_DEP.txt} This can be used to recursively evaluate the dependencies at run time. Change-Id: Ia4cee0632c16ba9631e0289db906fe9d320844a3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
69 lines
2.6 KiB
CMake
69 lines
2.6 KiB
CMake
@PACKAGE_INIT@
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
get_filename_component(_import_prefix "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
get_filename_component(_import_prefix "${_import_prefix}" REALPATH)
|
|
|
|
# Extra cmake code begin
|
|
@extra_cmake_code@
|
|
# Extra cmake code end
|
|
|
|
# Find required dependencies, if any.
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
|
|
endif()
|
|
|
|
if (NOT QT_NO_CREATE_TARGETS)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")
|
|
if(NOT QT_NO_CREATE_VERSIONLESS_TARGETS)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@VersionlessTargets.cmake")
|
|
endif()
|
|
endif()
|
|
|
|
foreach(extra_cmake_include @extra_cmake_includes@)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/${extra_cmake_include}")
|
|
endforeach()
|
|
|
|
include(${_qt_@PROJECT_VERSION_MAJOR@_config_cmake_dir}/QtFeature.cmake)
|
|
|
|
qt_make_features_available(@QT_CMAKE_EXPORT_NAMESPACE@::@target@)
|
|
|
|
set("@INSTALL_CMAKE_NAMESPACE@@target@_FOUND" TRUE)
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Plugins.cmake")
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Plugins.cmake")
|
|
endif()
|
|
|
|
list(APPEND QT_ALL_MODULES_FOUND_VIA_FIND_PACKAGE "@target@")
|
|
|
|
get_target_property(_qt_module_target_type "@INSTALL_CMAKE_NAMESPACE@::@target@" TYPE)
|
|
if(NOT _qt_module_target_type STREQUAL "INTERFACE_LIBRARY")
|
|
get_target_property(_qt_module_plugin_types
|
|
@INSTALL_CMAKE_NAMESPACE@::@target@ MODULE_PLUGIN_TYPES)
|
|
if(_qt_module_plugin_types)
|
|
list(APPEND QT_ALL_PLUGIN_TYPES_FOUND_VIA_FIND_PACKAGE "${_qt_module_plugin_types}")
|
|
endif()
|
|
endif()
|
|
|
|
# Apply meta types properties
|
|
if (@QT_MODULE_HAS_META_TYPES_FILE@)
|
|
if (NOT QT_NO_CREATE_TARGETS)
|
|
set_target_properties("@INSTALL_CMAKE_NAMESPACE@::@target@" PROPERTIES
|
|
INTERFACE_QT_MODULE_HAS_META_TYPES TRUE
|
|
INTERFACE_QT_META_TYPES_INSTALL_FILE "@QT_MODULE_META_TYPES_FILE@"
|
|
INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "@QT_MODULE_META_TYPES_DEP_FILE@"
|
|
)
|
|
endif()
|
|
|
|
if (NOT QT_NO_CREATE_VERSIONLESS_TARGETS)
|
|
get_target_property(is_alias_target "Qt::@target@" ALIASED_TARGET)
|
|
if (NOT is_alias_target)
|
|
set_target_properties("Qt::@target@" PROPERTIES
|
|
INTERFACE_QT_MODULE_HAS_META_TYPES TRUE
|
|
INTERFACE_QT_META_TYPES_INSTALL_FILE "@QT_MODULE_META_TYPES_FILE@"
|
|
INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "@QT_MODULE_META_TYPES_DEP_FILE@"
|
|
)
|
|
endif()
|
|
endif()
|
|
endif()
|