cmake : add library versioning (#1352)

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
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

View File

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