Skip to content

Commit

Permalink
CMake: add initial support for installing lib and include files
Browse files Browse the repository at this point in the history
  • Loading branch information
yegorich committed Jan 18, 2022
1 parent 0909202 commit 8be18c7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 8be18c7

Please sign in to comment.