CMake/Tests/RunCMake/target_sources/FileSetExportMissingSetsInterfacePostExport.cmake
Kyle Edwards 3fee5398bd install(EXPORT): Check for missing file sets at generate time
Missing file sets were originally checked at configure time in
install(TARGETS ... EXPORT), but were not checked at generate time. If
a file set was added after install(TARGETS ... EXPORT) was called,
an abortion error was thrown. Check again at generate time to gracefully
display an error message instead of crashing.

Fixes: #23680
2022-06-29 15:05:32 -04:00

7 lines
205 B
CMake

enable_language(C)
add_library(lib1 STATIC empty.c)
install(TARGETS lib1 EXPORT a)
target_sources(lib1 INTERFACE FILE_SET a TYPE HEADERS BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} FILES h1.h)
export(EXPORT a)