Aside from moving the code to reduce duplication, the only changes in the code are the replacement of @target@ to ${target}, using IN LISTS with variable names to avoid macro expansion issues and replacing the if(var) conditions with double variable evaluation + NOT STREQUAL "". The function implementations are now in the same order as they are used in the Dependencies.cmake files. Task-number: QTBUG-104998 Change-Id: Iaae926414fd2a7cc09c2f5716376caaa0aade74b Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 7853f80e39912460421df4e255fed8e91ca9915a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
36 lines
1.5 KiB
CMake
36 lines
1.5 KiB
CMake
# Make sure @INSTALL_CMAKE_NAMESPACE@ is found before anything else.
|
|
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND FALSE)
|
|
|
|
if("${_qt_cmake_dir}" STREQUAL "")
|
|
set(_qt_cmake_dir "${QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR}")
|
|
endif()
|
|
set(__qt_use_no_default_path_for_qt_packages "NO_DEFAULT_PATH")
|
|
if(QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES)
|
|
set(__qt_use_no_default_path_for_qt_packages "")
|
|
endif()
|
|
|
|
find_dependency(@INSTALL_CMAKE_NAMESPACE@ @main_qt_package_version@
|
|
PATHS
|
|
"${CMAKE_CURRENT_LIST_DIR}/.."
|
|
"${_qt_cmake_dir}"
|
|
${_qt_additional_packages_prefix_paths}
|
|
${QT_EXAMPLES_CMAKE_PREFIX_PATH}
|
|
${__qt_use_no_default_path_for_qt_packages}
|
|
)
|
|
|
|
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
|
|
set(__qt_@target@_third_party_deps "@third_party_deps@")
|
|
_qt_internal_find_third_party_dependencies("@target@" __qt_@target@_third_party_deps)
|
|
|
|
# Find Qt tool package.
|
|
set(__qt_@target@_tool_deps "@main_module_tool_deps@")
|
|
_qt_internal_find_tool_dependencies("@target@" __qt_@target@_tool_deps)
|
|
|
|
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
|
|
set(__qt_@target@_target_deps "@target_deps@")
|
|
set(__qt_@target@_find_dependency_paths "${CMAKE_CURRENT_LIST_DIR}/.." "${_qt_cmake_dir}")
|
|
_qt_internal_find_dependencies(__qt_@target@_target_deps __qt_@target@_find_dependency_paths)
|
|
|
|
set(_@QT_CMAKE_EXPORT_NAMESPACE@@target@_MODULE_DEPENDENCIES "@qt_module_dependencies@")
|
|
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND TRUE)
|