Add new properties to better track what `find_package` command was used to import the target
It would be nice that when an imported target is created it would do the equivalent of this(or at least if it is in a find_package
context):
add_library(SomeLib IMPORTED)
set_target_properties(SomeLib PROPERTIES
FIND_PACKAGE_NAME ${CMAKE_FIND_PACKAGE_NAME}
FIND_PACKAGE_REQUIRED ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED
FIND_PACKAGE_QUIETLY ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY
FIND_PACKAGE_EXACT ${CMAKE_FIND_PACKAGE_NAME}_FIND_EXACT
FIND_PACKAGE_VERSION ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION
FIND_PACKAGE_VERSION_MAJOR ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_MAJOR
FIND_PACKAGE_VERSION_MINOR ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_MINOR
FIND_PACKAGE_VERSION_PATCH ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_PATCH
FIND_PACKAGE_VERSION_COUNT ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_COUNT
)
This way I can iterate over the imported targets and generate the find_dependency
calls in my *-config.cmake files automatically.