CMake: add .so-version

This is basically PR #2002, from Undef-a.
This commit is contained in:
Adriaan de Groot 2022-08-23 15:45:20 +02:00
parent c939fbce96
commit 6558cd5150
3 changed files with 7 additions and 1 deletions

View File

@ -65,6 +65,11 @@ project(CALAMARES VERSION ${CALAMARES_VERSION_SHORT} LANGUAGES C CXX HOMEPAGE_UR
if(NOT CALAMARES_RELEASE_MODE AND CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "Do not build development versions in the source-directory.")
endif()
# Calamares in the 3.3 series promises ABI compatbility, so it sets a
# .so-version equal to the series number. We use ci/abicheck.sh to
# keep track of this. Note that the **alpha** releases also have
# such an .so-version, but are not ABI-stable yet.
set(CALAMARES_SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
### OPTIONS
#

View File

@ -97,7 +97,7 @@ set_target_properties(
calamares
PROPERTIES
VERSION ${CALAMARES_VERSION_SHORT}
SOVERSION ${CALAMARES_VERSION_SHORT}
SOVERSION ${CALAMARES_SOVERSION}
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_INSTALL_FULL_INCLUDEDIR}/libcalamares
)
target_link_libraries(calamares LINK_PUBLIC yamlcpp::yamlcpp Qt5::Core KF5::CoreAddons)

View File

@ -53,6 +53,7 @@ calamares_add_library(calamaresui
UI
utils/ErrorDialog/ErrorDialog.ui
VERSION ${CALAMARES_VERSION_SHORT}
SOVERSION ${CALAMARES_SOVERSION}
)
target_link_libraries(calamaresui PRIVATE yamlcpp::yamlcpp)
if(KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58)