commit
3276bdd23d
6 changed files with 109 additions and 6 deletions
@ -0,0 +1,26 @@ |
||||
# This is a CMake version of this test. It behaves slightly differently |
||||
# so in case you ever need to debug this, here it is. |
||||
# |
||||
# The biggest difference is that if SOVERSION is not set, it |
||||
# is set to VERSION. Autotools sets it to the first number |
||||
# of VERSION. That is, for version number 1.2.3 CMake sets |
||||
# soname to 1.2.3 but Autotools sets it to 1. |
||||
|
||||
project(vertest C) |
||||
cmake_minimum_required(VERSION 3.5) |
||||
|
||||
add_library(nover SHARED versioned.c) |
||||
|
||||
add_library(verset SHARED versioned.c) |
||||
set_target_properties(verset PROPERTIES VERSION 4.5.6) |
||||
|
||||
add_library(soverset SHARED versioned.c) |
||||
set_target_properties(soverset PROPERTIES SOVERSION 1.2.3) |
||||
|
||||
add_library(bothset SHARED versioned.c) |
||||
set_target_properties(bothset PROPERTIES SOVERSION 1.2.3) |
||||
set_target_properties(bothset PROPERTIES VERSION 4.5.6) |
||||
|
||||
add_library(settosame SHARED versioned.c) |
||||
set_target_properties(settosame PROPERTIES SOVERSION 7.8.9) |
||||
set_target_properties(settosame PROPERTIES VERSION 7.8.9) |
@ -0,0 +1,18 @@ |
||||
project('vertest', 'c') |
||||
|
||||
shared_library('nover', 'versioned.c') |
||||
|
||||
shared_library('verset', 'versioned.c', |
||||
version : '4.5.6') |
||||
|
||||
shared_library('soverset', 'versioned.c', |
||||
soversion : '1.2.3') |
||||
|
||||
shared_library('bothset', 'versioned.c', |
||||
soversion : '1.2.3', |
||||
version : '4.5.6') |
||||
|
||||
shared_library('settosame', 'versioned.c', |
||||
soversion : '7.8.9', |
||||
version : '7.8.9') |
||||
|
@ -0,0 +1,3 @@ |
||||
int versioned_func() { |
||||
return 0; |
||||
} |
Loading…
Reference in new issue