qt5base-lts/cmake/QtConfigDependencies.cmake.in

45 lines
1.5 KiB
CMake
Raw Normal View History

set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND FALSE)
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
set(_third_party_deps "@third_party_deps@")
@third_party_extra@
foreach(_target_dep ${_third_party_deps})
list(GET _target_dep 0 pkg)
list(GET _target_dep 1 is_optional)
list(GET _target_dep 2 version)
list(GET _target_dep 3 components)
set(find_package_args "${pkg}")
if(version)
list(APPEND find_package_args "${version}")
endif()
if(components)
string(REPLACE " " ";" components "${components}")
list(APPEND find_package_args COMPONENTS ${components})
endif()
# Already build an error message, because find_dependency calls return() on failure.
set(__@INSTALL_CMAKE_NAMESPACE@_message "\nPackage: ${pkg}")
if(version)
string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nVersion: ${version}")
endif()
if(components)
string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nComponents: ${components}")
endif()
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE
"${__@INSTALL_CMAKE_NAMESPACE@_message}")
if(is_optional)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
list(APPEND find_package_args QUIET)
endif()
find_package(${find_package_args})
else()
find_dependency(${find_package_args})
endif()
endforeach()
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND TRUE)
unset(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE)