Export cmake library config too
This commit is contained in:
parent
8dc639e301
commit
524809f28f
|
@ -13,12 +13,14 @@ configure_file(test_shared_library.pc.in test_shared_library.pc @ONLY)
|
|||
|
||||
target_include_directories(test_shared_library PRIVATE .)
|
||||
|
||||
install(TARGETS test_shared_library
|
||||
install(TARGETS test_shared_library EXPORT test_shared_library_export
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(FILES ${CMAKE_BINARY_DIR}/test_shared_library.pc
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|
||||
|
||||
install(EXPORT test_shared_library_export DESTINATION share/test_shared_library/cmake)
|
||||
|
||||
|
||||
add_executable(test test.c)
|
||||
target_link_libraries(test test_shared_library)
|
||||
|
|
Loading…
Reference in New Issue
Block a user