aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-15 15:15:52 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-15 15:33:05 +0100
commit470a6533147ad3c0cab5e0b7ba99736d52a0978a (patch)
treeea3015e122c5b730bc388de8ffcda4f05a662587
parentb6670f0fbf84ef7aaa74422dc3d0897c555196ee (diff)
downloadlibayatana-common-470a6533147ad3c0cab5e0b7ba99736d52a0978a.tar.gz
libayatana-common-470a6533147ad3c0cab5e0b7ba99736d52a0978a.tar.bz2
libayatana-common-470a6533147ad3c0cab5e0b7ba99736d52a0978a.zip
Explicitly set ABI_VERSION / API_VERSION and use ABI_VERSION in the .so filename.
-rw-r--r--CMakeLists.txt3
-rw-r--r--src/CMakeLists.txt7
2 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf34c7c..0a52550 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,9 @@ cmake_minimum_required (VERSION 2.8.9)
set(PROJECT_VERSION "0.8.1")
set(PACKAGE ${CMAKE_PROJECT_NAME})
+set(API_VERSION 0)
+set(ABI_VERSION 0)
+
# Options
option(DISABLE_TESTS "Disable tests" off)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5dce006..4a6a5aa 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,6 +16,13 @@ set(PUBLIC_HEADERS
utils.h
)
+set_target_properties(ayatana-common
+ PROPERTIES
+ VERSION ${API_VERSION}.0.0
+ SOVERSION ${ABI_VERSION}
+ PUBLIC_HEADER "${PUBLIC_HEADERS}"
+)
+
configure_file(libayatana-common.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libayatana-common.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libayatana-common.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)