summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorCarsten Brandt <mail@cebe.cc>2017-01-15 21:22:35 +0100
committerSergey 'Jin' Bostandzhyan <jin at mediatomb dot cc>2017-01-18 11:20:07 +0100
commit3520eee05d9828f16434f1c3591ea0f9a2153596 (patch)
treeaf87e5291c7eaedf3b04616ebc46ffbe95efc7c6 /cmake
parent3f24f048762736e1a5d785a080fec7e84172e708 (diff)
SO versions for cmake and libtool
this updates the version-sync script to generate proper SO versions which will be used by cmake and libtool to create version symlinks on the system when a library is installed as well as setting the SO version in the binary. To see what this does, you have to configure tox with a prefix: ./configure --prefix=/tmp/tox-with-libtool mkdir cbuild && cd cbuild && cmake -DCMAKE_INSTALL_PREFIX=/tmp/tox-with-cmake .. Then run `make && make install`. in both instances you should see the following installed in `lib/`: libtoxcore.so -> libtoxcore.so.1.4.0 libtoxcore.so.1 -> libtoxcore.so.1.4.0 libtoxcore.so.1.4.0 inside the binary the soname should be the one with .1 and it should not contain the full version: $ objdump -p libtoxcore.so.1.4.0 | grep SONAME SONAME libtoxcore.so.1
Diffstat (limited to 'cmake')
-rw-r--r--cmake/ModulePackage.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmake/ModulePackage.cmake b/cmake/ModulePackage.cmake
index f6e7e31a..38f841ba 100644
--- a/cmake/ModulePackage.cmake
+++ b/cmake/ModulePackage.cmake
@@ -56,10 +56,8 @@ function(add_module lib)
56 add_library(${lib}_shared SHARED ${ARGN}) 56 add_library(${lib}_shared SHARED ${ARGN})
57 set_target_properties(${lib}_shared PROPERTIES 57 set_target_properties(${lib}_shared PROPERTIES
58 OUTPUT_NAME ${lib} 58 OUTPUT_NAME ${lib}
59 VERSION ${PROJECT_VERSION} 59 VERSION ${SOVERSION}
60 # While on 0.x, the x behaves like the major version. 0.2 will be 60 SOVERSION ${SOVERSION_MAJOR}
61 # incompatible with 0.1. Change this, when releasing 1.0!
62 SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
63 ) 61 )
64 install(TARGETS ${lib}_shared DESTINATION "lib") 62 install(TARGETS ${lib}_shared DESTINATION "lib")
65 endif() 63 endif()