cmake : add library versioning (#1352)

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
pull/1895/head
kennethge 2024-03-04 14:17:48 -05:00 committed by GitHub
parent c713eb5e2a
commit ccd7c1d2da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,7 @@
cmake_minimum_required (VERSION 3.5)
project(whisper.cpp VERSION 1.5.4)
set(SOVERSION 1)
# Add path to modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
@ -542,6 +543,12 @@ add_library(${TARGET}
whisper.cpp
)
# Set the version numbers
set_target_properties(whisper PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${SOVERSION}
)
include(DefaultTargetOptions)
target_include_directories(${TARGET} PUBLIC