aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-12-02 23:57:19 +0200
committerGitHub <noreply@github.com>2016-12-02 23:57:19 +0200
commit3276bdd23d0479eb343b95e80ac0d87475bb3a7e (patch)
treeaec07111dda4960f3db83ba4eef06531ac941277 /test cases
parente933bdd87229f13766705274a8815e9f10d4fe8d (diff)
parent07d7e87411ca411682344c945c006fd61fa7ab98 (diff)
downloadmeson-3276bdd23d0479eb343b95e80ac0d87475bb3a7e.zip
meson-3276bdd23d0479eb343b95e80ac0d87475bb3a7e.tar.gz
meson-3276bdd23d0479eb343b95e80ac0d87475bb3a7e.tar.bz2
Merge pull request #1102 from mesonbuild/soname
Fix soname symlink generation
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/1 soname/CMakeLists.txt26
-rw-r--r--test cases/unit/1 soname/meson.build18
-rw-r--r--test cases/unit/1 soname/versioned.c3
3 files changed, 47 insertions, 0 deletions
diff --git a/test cases/unit/1 soname/CMakeLists.txt b/test cases/unit/1 soname/CMakeLists.txt
new file mode 100644
index 0000000..c4f2e3e
--- /dev/null
+++ b/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/test cases/unit/1 soname/meson.build b/test cases/unit/1 soname/meson.build
new file mode 100644
index 0000000..d956afe
--- /dev/null
+++ b/test cases/unit/1 soname/meson.build
@@ -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')
+
diff --git a/test cases/unit/1 soname/versioned.c b/test cases/unit/1 soname/versioned.c
new file mode 100644
index 0000000..f48d2b0
--- /dev/null
+++ b/test cases/unit/1 soname/versioned.c
@@ -0,0 +1,3 @@
+int versioned_func() {
+ return 0;
+}