mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Change the interface of the `export` command so that `PACKAGE_INFO` and `SBOM` are proper, first-level sub-commands, rather than being implemented via `export(EXPORT ... (PACKAGE_INFO|SBOM) ...)`. This brings consistency with the `install` command and also simplifies argument parsing. Update the documentation and test cases accordingly. Some of the argument handling test cases are now rather gratuitous, and are removed, which also improves consistency with the `install` tests.
12 lines
266 B
CMake
12 lines
266 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 DESTINATION .)
|
|
export(PACKAGE_INFO foo EXPORT foo)
|