Set SOVERSION for kiapi

This commit is contained in:
Jon Evans 2024-04-03 18:12:12 -04:00
parent 2b1f56ebc8
commit 6a203fb289
1 changed files with 11 additions and 0 deletions

View File

@ -99,6 +99,17 @@ endif()
# Because CMake doesn't guess this from the .cc extension generated by protoc
set_target_properties( kiapi PROPERTIES LINKER_LANGUAGE CXX )
include( ${KICAD_CMAKE_MODULE_PATH}/KiCadVersion.cmake )
# Extract the major and minor build version as a string
string( REGEX MATCH
"([0-9]+)\\.([0-9]+)\\.([0-9]+)"
KICAD_MAJOR_MINOR_PATCH_VERSION
"${KICAD_VERSION}"
)
set_target_properties( kiapi PROPERTIES SOVERSION ${KICAD_MAJOR_MINOR_PATCH_VERSION} )
target_include_directories( kiapi SYSTEM PUBLIC ${Protobuf_INCLUDE_DIRS} )
target_link_libraries( kiapi protobuf::libprotobuf )