mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-26 19:40:24 +00:00
[cmake] Separate API and ABI versions
This commit is contained in:
parent
e79f45dac7
commit
9349a566e2
@ -17,6 +17,15 @@ endif ()
|
||||
|
||||
project(libsndfile VERSION 1.0.31)
|
||||
|
||||
#
|
||||
# ABI version of library.
|
||||
#
|
||||
|
||||
set (SNDFILE_ABI_VERSION_MAJOR 1)
|
||||
set (SNDFILE_ABI_VERSION_MINOR 0)
|
||||
set (SNDFILE_ABI_VERSION_PATCH 31)
|
||||
set (SNDFILE_ABI_VERSION "${SNDFILE_ABI_VERSION_MAJOR}.${SNDFILE_ABI_VERSION_MINOR}.${SNDFILE_ABI_VERSION_PATCH}")
|
||||
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
@ -402,8 +411,8 @@ if (BUILD_SHARED_LIBS)
|
||||
endif ()
|
||||
|
||||
set_target_properties (sndfile PROPERTIES
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||
VERSION ${PROJECT_VERSION}
|
||||
SOVERSION ${SNDFILE_ABI_VERSION_MAJOR}
|
||||
VERSION ${SNDFILE_ABI_VERSION}
|
||||
)
|
||||
|
||||
# Symbol files generation
|
||||
@ -425,7 +434,7 @@ if (BUILD_SHARED_LIBS)
|
||||
if (DEFINED SYMBOL_OS)
|
||||
add_custom_command (
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/${SYMBOL_FILENAME}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/src/create_symbols_file.py ${SYMBOL_OS} ${PROJECT_VERSION} > ${CMAKE_CURRENT_BINARY_DIR}/src/${SYMBOL_FILENAME}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/src/create_symbols_file.py ${SYMBOL_OS} ${SNDFILE_ABI_VERSION} > ${CMAKE_CURRENT_BINARY_DIR}/src/${SYMBOL_FILENAME}
|
||||
COMMENT "Generating ${SYMBOL_FILENAME}..."
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user