1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Files
CMake/Tests/RunCMake/InstallPackageInfo/DependencyVersionCps.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
253 B
CMake

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