Debian Codegraph @

test cases/unit/1 soname/CMakeLists.txt

raw
1 # This is a CMake version of this test. It behaves slightly differently
2 # so in case you ever need to debug this, here it is.
3 #
4 # The biggest difference is that if SOVERSION is not set, it
5 # is set to VERSION. Autotools sets it to the first number
6 # of VERSION. That is, for version number 1.2.3 CMake sets
7 # soname to 1.2.3 but Autotools sets it to 1.
8
9 project(vertest C)
10 cmake_minimum_required(VERSION ${CMAKE_VERSION})
11
12 add_library(nover SHARED versioned.c)
13
14 add_library(verset SHARED versioned.c)
15 set_target_properties(verset PROPERTIES VERSION 4.5.6)
16
17 add_library(soverset SHARED versioned.c)
18 set_target_properties(soverset PROPERTIES SOVERSION 1.2.3)
19
20 add_library(bothset SHARED versioned.c)
21 set_target_properties(bothset PROPERTIES SOVERSION 1.2.3)
22 set_target_properties(bothset PROPERTIES VERSION 4.5.6)
23
24 add_library(settosame SHARED versioned.c)
25 set_target_properties(settosame PROPERTIES SOVERSION 7.8.9)
26 set_target_properties(settosame PROPERTIES VERSION 7.8.9)