2020-09-14 07:06:58 +00:00
|
|
|
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND FALSE)
|
|
|
|
|
2020-09-14 07:37:03 +00:00
|
|
|
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
|
2020-08-03 14:28:16 +00:00
|
|
|
set(_third_party_deps "@third_party_deps@")
|
|
|
|
|
|
|
|
@third_party_extra@
|
|
|
|
|
|
|
|
foreach(_target_dep ${_third_party_deps})
|
|
|
|
list(GET _target_dep 0 pkg)
|
2020-09-14 07:37:03 +00:00
|
|
|
list(GET _target_dep 1 is_optional)
|
|
|
|
list(GET _target_dep 2 version)
|
|
|
|
list(GET _target_dep 3 components)
|
2021-06-17 10:04:16 +00:00
|
|
|
list(GET _target_dep 4 optional_components)
|
2020-08-03 14:28:16 +00:00
|
|
|
set(find_package_args "${pkg}")
|
|
|
|
if(version)
|
|
|
|
list(APPEND find_package_args "${version}")
|
|
|
|
endif()
|
2020-09-14 07:36:16 +00:00
|
|
|
if(components)
|
|
|
|
string(REPLACE " " ";" components "${components}")
|
|
|
|
list(APPEND find_package_args COMPONENTS ${components})
|
|
|
|
endif()
|
2021-06-17 10:04:16 +00:00
|
|
|
if(optional_components)
|
|
|
|
string(REPLACE " " ";" optional_components "${optional_components}")
|
|
|
|
list(APPEND find_package_args OPTIONAL_COMPONENTS ${optional_components})
|
|
|
|
endif()
|
2020-08-03 14:28:16 +00:00
|
|
|
|
2020-09-14 07:06:58 +00:00
|
|
|
# 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()
|
2021-06-17 10:04:16 +00:00
|
|
|
if(optional_components)
|
|
|
|
string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nComponents: ${optional_components}")
|
|
|
|
endif()
|
2020-09-14 07:06:58 +00:00
|
|
|
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE
|
|
|
|
"${__@INSTALL_CMAKE_NAMESPACE@_message}")
|
|
|
|
|
2020-09-14 07:37:03 +00:00
|
|
|
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()
|
2020-09-13 10:16:44 +00:00
|
|
|
endforeach()
|
2020-09-14 07:06:58 +00:00
|
|
|
|
|
|
|
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND TRUE)
|
|
|
|
unset(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE)
|