Matthew Woehlke 254916dfc6 export: Make PACKAGE_INFO, SBOM sub-commands
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.
2026-01-12 14:05:27 -05:00

34 lines
564 B
CMake

project(TestLibrary C)
add_library(liba SHARED)
target_sources(liba
PRIVATE
liba/liba.c
INTERFACE
FILE_SET HEADERS
BASE_DIRS
liba
FILES
liba/liba.h
)
add_library(libb SHARED)
target_sources(libb
PRIVATE
libb/libb.c
INTERFACE
FILE_SET HEADERS
BASE_DIRS
libb
FILES
libb/libb.h
)
target_link_libraries(libb PUBLIC liba)
install(TARGETS liba EXPORT liba FILE_SET HEADERS)
export(PACKAGE_INFO liba EXPORT liba)
install(TARGETS libb EXPORT libb FILE_SET HEADERS)
export(PACKAGE_INFO libb EXPORT libb)