From 6a203fb289ab91e1718ddadd8dbaeccb5915980d Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 3 Apr 2024 18:12:12 -0400 Subject: [PATCH] Set SOVERSION for kiapi --- api/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index 893b3cc7e2..ab69cf66cd 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -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 )