Files
CMake/Tests/RunCMake/InstallPackageInfo/DependencyVersionCMake.cmake
Taylor Sasser ae373e93fb install(PACKAGE_INFO): Add version and location to package dependencies
Refactor `cmFindPackageStack` to track additional metadata
about <package> found. This includes two new fields,
`Version` and `Location` which correspond to package version and path.
The remaining package information will be implemented in a later commit
2025-08-12 11:07:09 -04:00

12 lines
267 B
CMake

find_package(
bar 1.3.4 REQUIRED CONFIG
NO_DEFAULT_PATH
PATHS ${CMAKE_CURRENT_LIST_DIR}/config
)
add_library(foo INTERFACE)
target_link_libraries(foo INTERFACE bar::bar)
install(TARGETS foo EXPORT foo)
install(PACKAGE_INFO foo EXPORT foo DESTINATION .)