diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/unit/1 soname | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/unit/1 soname')
-rw-r--r-- | meson/test cases/unit/1 soname/CMakeLists.txt | 26 | ||||
-rw-r--r-- | meson/test cases/unit/1 soname/meson.build | 22 | ||||
-rw-r--r-- | meson/test cases/unit/1 soname/versioned.c | 3 |
3 files changed, 51 insertions, 0 deletions
diff --git a/meson/test cases/unit/1 soname/CMakeLists.txt b/meson/test cases/unit/1 soname/CMakeLists.txt new file mode 100644 index 000000000..c4f2e3eb9 --- /dev/null +++ b/meson/test cases/unit/1 soname/CMakeLists.txt @@ -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) diff --git a/meson/test cases/unit/1 soname/meson.build b/meson/test cases/unit/1 soname/meson.build new file mode 100644 index 000000000..950dadc5d --- /dev/null +++ b/meson/test cases/unit/1 soname/meson.build @@ -0,0 +1,22 @@ +project('vertest', 'c') + +shared_library('nover', 'versioned.c', + install : true) + +shared_library('verset', 'versioned.c', + install : true, + version : '4.5.6') + +shared_library('soverset', 'versioned.c', + install : true, + soversion : '1.2.3') + +shared_library('bothset', 'versioned.c', + install : true, + soversion : '1.2.3', + version : '4.5.6') + +shared_library('settosame', 'versioned.c', + install : true, + soversion : '7.8.9', + version : '7.8.9') diff --git a/meson/test cases/unit/1 soname/versioned.c b/meson/test cases/unit/1 soname/versioned.c new file mode 100644 index 000000000..f48d2b0b8 --- /dev/null +++ b/meson/test cases/unit/1 soname/versioned.c @@ -0,0 +1,3 @@ +int versioned_func() { + return 0; +} |