blob: d2e09ea35d7213263867820095362964876fad4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
enable_language(C)
add_library(foo SHARED foo.c)
set_property(TARGET foo PROPERTY ENABLE_EXPORTS TRUE)
set_property(TARGET foo PROPERTY LIBRARY_OUTPUT_DIRECTORY $<CONFIG>)
set_property(TARGET foo PROPERTY ARCHIVE_OUTPUT_DIRECTORY $<CONFIG>)
install(TARGETS foo EXPORT foo DESTINATION "${CMAKE_BINARY_DIR}/$<CONFIG>")
install(EXPORT foo DESTINATION lib/foo NAMESPACE foo-install::)
install(FILES foo-config.cmake.in RENAME foo-config.cmake DESTINATION lib/foo)
export(TARGETS foo NAMESPACE foo-build:: FILE Release/foo.cmake)
|