cbe7e8fae4
Teach the export command to handle export sets defined by invocations of install(TARGETS ... EXPORT foo). This makes maintenance of targets exported to both the build tree and install tree trivial.
11 lines
269 B
CMake
11 lines
269 B
CMake
add_library(foo empty.cpp)
|
|
export(TARGETS foo FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake")
|
|
install(TARGETS foo EXPORT fooExport
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib
|
|
ARCHIVE DESTINATION lib
|
|
)
|
|
export(EXPORT fooExport
|
|
EXPORT_LINK_INTERFACE_LIBRARIES
|
|
)
|