Export config file
This commit is contained in:
parent
986f9e6c3e
commit
3a443ebe93
|
@ -33,10 +33,12 @@ install(TARGETS test_shared_library EXPORT test_shared_libraryConfig
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/test_shared_library.pc
|
install(FILES ${CMAKE_BINARY_DIR}/test_shared_library.pc
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|
||||||
|
|
||||||
|
# install exported packages
|
||||||
install(EXPORT test_shared_libraryConfig DESTINATION share/test_shared_library/cmake)
|
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)
|
add_executable(test_library test.c)
|
||||||
target_link_libraries(test_library test_shared_library)
|
target_link_libraries(test_library test_shared_library)
|
||||||
|
# testing support with make test
|
||||||
add_test(test_shared_lib_dynamic test_library)
|
add_test(test_shared_lib_dynamic test_library)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user