Files
CMake/Tests/RunCMake/CpsExportImport/TestLibrary.cmake
Matthew Woehlke 647633e961 Tests: Add CPS end-to-end test
Add a test that validates that we can export a package in CPS format and
import it again. This is fairly simplistic at the moment, but still
serves to validate some recent fixes that are not covered by more
targeted unit tests.
2025-02-15 07:49:13 -05:00

15 lines
401 B
CMake

project(TestLibrary C)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/../install")
add_library(liba SHARED liba.c)
add_library(libb SHARED libb.c)
target_link_libraries(libb PUBLIC liba)
install(TARGETS liba EXPORT liba DESTINATION lib)
install(PACKAGE_INFO liba DESTINATION cps EXPORT liba)
install(TARGETS libb EXPORT libb DESTINATION lib)
install(PACKAGE_INFO libb DESTINATION cps EXPORT libb)