Skip to content
Snippets Groups Projects
Commit 459bb8a2 authored by Bart Ribbers's avatar Bart Ribbers Committed by Leo
Browse files

testing/s2geometry: add version information to the library

parent f81d561d
1 merge request!15324testing/s2geometry: add version information to the library
Upstream PR: https://github.com/google/s2geometry/pull/161
From 132f14fdd15fff532b5ad78ce1c5fedd242164d3 Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Sat, 5 Dec 2020 14:24:27 +0100
Subject: [PATCH] CMake: add version information to the library
On Linux systems, libraries need to be installed with attached version
information so other packages can depend on specific versions and make
sure they don't compile against a version they're not compatible with
This change installs libs2.so.0.10.0 with appropriate
symlinks as libs2.so.0 and libs2.so.
Do note that for new future versions, the version in CMakeLists.txt will have
to be updated as well
---
CMakeLists.txt | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8e87f2..62d411e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.12)
-project(s2-geometry)
+project(s2-geometry
+ VERSION 0.9.0)
include(CMakeDependentOption)
include(CheckCXXCompilerFlag)
@@ -214,6 +215,11 @@ target_link_libraries(
# target_link_libraries(<target_name> s2)
target_include_directories(s2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
+# Add version information to the target
+set_target_properties(s2 PROPERTIES
+ SOVERSION ${PROJECT_VERSION_MAJOR}
+ VERSION ${PROJECT_VERSION})
+
# We don't need to install all headers, only those
# transitively included by s2 headers we are exporting.
install(FILES src/s2/_fp_contract_off.h
--
2.29.2
......@@ -2,7 +2,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=s2geometry
pkgver=0.9.0
pkgrel=0
pkgrel=1
pkgdesc="Computational geometry and spatial indexing on the sphere "
url="http://s2geometry.io/"
arch="all"
......@@ -17,8 +17,9 @@ makedepends="
source="https://github.com/google/s2geometry/archive/v$pkgver/s2geometry-v$pkgver.tar.gz
fix-uint-handling.patch
fix-newer-openssl.patch
0001-CMake-add-version-information-to-the-library.patch
"
subpackages="$pkgname-dev py3-$pkgname:_py3"
subpackages="$pkgname-static $pkgname-dev py3-$pkgname:_py3"
options="!check" # No test target available
build() {
......@@ -43,4 +44,5 @@ _py3() {
sha512sums="854ec84a54aff036b3092a6233be0f5fc0e4846ac5f882326bbb3f2b9ce88bd5c866a80ae352d8e7d5ae00b9c9a8ab1cff6a95412f990b7bc1fdc5ca3d632b9c s2geometry-v0.9.0.tar.gz
6d8ad6dbe3ccbfa9ee230aae7738d7dfe990bded7e268e21f710a29e3ce6463d01ca1694373453e3ceac4eb19cd86532729761c93f079db4ddb422b84602188f fix-uint-handling.patch
a7b79ce8ec0f45cc6e04925d1530c56126de23b168fc6f5bc22905a8af0006a7aab59dbebf194a5e69bbcf6da9168836e4de775d9cea926ff49e9ebf4471693a fix-newer-openssl.patch"
a7b79ce8ec0f45cc6e04925d1530c56126de23b168fc6f5bc22905a8af0006a7aab59dbebf194a5e69bbcf6da9168836e4de775d9cea926ff49e9ebf4471693a fix-newer-openssl.patch
4f8bce3ec21a3be63c47f3fb78d576065085e243bb7522c1349720cd333f010320f98b391a0f8a323607d31a09d3a395b7f7b420638f16eea8deb968d3f2c99c 0001-CMake-add-version-information-to-the-library.patch"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment