Blob Blame History Raw
From 533b4f5421ecfe16f2f661ff8232a2340ea4c13d Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
Date: Wed, 29 Dec 2021 14:00:54 +0000
Subject: [PATCH 5/7] Define soname versions

---
 libnestutil/CMakeLists.txt |  7 +++++++
 models/CMakeLists.txt      |  5 +++++
 nest/CMakeLists.txt        |  6 ++++++
 nestkernel/CMakeLists.txt  |  5 +++++
 sli/CMakeLists.txt         | 14 ++++++++++++++
 5 files changed, 37 insertions(+)

diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt
index a10b4b8d0..93ed28dc9 100644
--- a/libnestutil/CMakeLists.txt
+++ b/libnestutil/CMakeLists.txt
@@ -37,6 +37,13 @@ set( nestutil_sources
 
 add_library( nestutil ${nestutil_sources} )
 
+set_target_properties( nestutil
+    PROPERTIES
+    VERSION ${NEST_VERSION}
+    SOVERSION 3
+    )
+
+
 target_link_libraries( nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS} )
 
 target_include_directories( nestutil PRIVATE
diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt
index 13b097e30..05d4dcd79 100644
--- a/models/CMakeLists.txt
+++ b/models/CMakeLists.txt
@@ -140,6 +140,11 @@ set( models_sources
     )
 
 add_library( models ${models_sources} )
+set_target_properties( models
+    PROPERTIES
+    VERSION ${NEST_VERSION}
+    SOVERSION 3
+    )
 target_link_libraries( models nestutil sli_lib nestkernel )
 
 target_include_directories( models PRIVATE
diff --git a/nest/CMakeLists.txt b/nest/CMakeLists.txt
index 4f59019d2..b2f46dd11 100644
--- a/nest/CMakeLists.txt
+++ b/nest/CMakeLists.txt
@@ -55,6 +55,12 @@ else ()
         )
 endif ()
 
+set_target_properties( nest_lib
+    PROPERTIES
+    VERSION ${NEST_VERSION}
+    SOVERSION 3
+    )
+
 target_link_libraries( nest
     nestutil nestkernel sli_lib sli_readline
     ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES} OpenMP::OpenMP_CXX )
diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
index 916fd92bf..ede7049b8 100644
--- a/nestkernel/CMakeLists.txt
+++ b/nestkernel/CMakeLists.txt
@@ -132,6 +132,11 @@ endif ()
 
 
 add_library( nestkernel ${nestkernel_sources} )
+set_target_properties( nestkernel
+    PROPERTIES
+    VERSION ${NEST_VERSION}
+    SOVERSION 3
+    )
 target_link_libraries( nestkernel
     nestutil sli_lib
     ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES}
diff --git a/sli/CMakeLists.txt b/sli/CMakeLists.txt
index 18248ee55..f70733ce8 100644
--- a/sli/CMakeLists.txt
+++ b/sli/CMakeLists.txt
@@ -83,6 +83,13 @@ set( sli_sources
     )
 
 add_library( sli_lib ${sli_sources} )
+
+set_target_properties( sli_lib
+    PROPERTIES
+    VERSION ${NEST_VERSION}
+    SOVERSION 3
+    )
+
 target_link_libraries( sli_lib nestutil OpenMP::OpenMP_CXX )
 
 # Make a separate target for linking against readline, so that
@@ -91,6 +98,13 @@ target_link_libraries( sli_lib nestutil OpenMP::OpenMP_CXX )
 # pull request for more information:
 # https://github.com/nest/nest-simulator/pull/323
 add_library( sli_readline gnureadline.cc gnureadline.h )
+
+set_target_properties( sli_readline
+    PROPERTIES
+    VERSION ${NEST_VERSION}
+    SOVERSION 3
+    )
+
 target_link_libraries( sli_readline sli_lib nestutil ${READLINE_LIBRARIES} OpenMP::OpenMP_CXX )
 
 # add the executable
-- 
2.34.1