1 2 3 4
add_library(iface INTERFACE) export(TARGETS iface FILE "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake" DESTINATION cmake)