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.
15 lines
363 B
CMake
15 lines
363 B
CMake
add_library(foo INTERFACE)
|
|
add_library(bar INTERFACE)
|
|
|
|
add_library(test INTERFACE)
|
|
target_link_libraries(test INTERFACE foo bar)
|
|
|
|
install(TARGETS foo EXPORT foo DESTINATION .)
|
|
install(TARGETS bar EXPORT bar DESTINATION .)
|
|
|
|
export(EXPORT foo)
|
|
export(EXPORT bar NAMESPACE bar_)
|
|
|
|
install(TARGETS test EXPORT test DESTINATION .)
|
|
export(PACKAGE_INFO test EXPORT test)
|