CMake: add initial support for installing lib and include files

This commit is contained in:
Yegor Yefremov 2022-01-11 23:58:45 +01:00
parent 090920298d
commit 8be18c788e
1 changed files with 11 additions and 1 deletions

View File

@ -586,7 +586,12 @@ add_library(libavrdude
${BISON_Parser_OUTPUTS}
)
set_target_properties(libavrdude PROPERTIES PREFIX "")
set_target_properties(libavrdude PROPERTIES
PREFIX ""
PUBLIC_HEADER "libavrdude.h"
VERSION 1.0.0
SOVERSION 1
)
target_include_directories(libavrdude
PUBLIC
@ -625,5 +630,10 @@ target_link_libraries(avrdude PUBLIC libavrdude)
# =====================================
install(TARGETS avrdude DESTINATION bin)
install(TARGETS libavrdude
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include COMPONENT dev
)
install(FILES "${PROJECT_BINARY_DIR}/avrdude.conf" TYPE SYSCONF)
install(FILES avrdude.1 TYPE MAN)