Export config file

This commit is contained in:
Václav Valíček 2020-05-17 21:53:37 +02:00
parent 986f9e6c3e
commit 3a443ebe93

View File

@ -33,10 +33,12 @@ install(TARGETS test_shared_library EXPORT test_shared_libraryConfig
install(FILES ${CMAKE_BINARY_DIR}/test_shared_library.pc
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
# install exported packages
install(EXPORT test_shared_libraryConfig DESTINATION share/test_shared_library/cmake)
export(TARGETS ${PROJECT_NAME} FILE test_shared_libraryConfig.cmake)
# test executable
add_executable(test_library test.c)
target_link_libraries(test_library test_shared_library)
# testing support with make test
add_test(test_shared_lib_dynamic test_library)