aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-10-23 15:56:43 +0200
committerGitHub <noreply@github.com>2021-10-23 15:56:43 +0200
commit9817fe7db31d5a0716876e1f8f7f1a9ba4b91be0 (patch)
tree89d22bd64404ab7798c2fea624947b300767270a
parent9aed9e0297ee049dfc92fe1dadc94302fcc44ca0 (diff)
parent5a47650a5bdbffe5a877164857d40ae28babf6eb (diff)
downloadPROJ-9817fe7db31d5a0716876e1f8f7f1a9ba4b91be0.tar.gz
PROJ-9817fe7db31d5a0716876e1f8f7f1a9ba4b91be0.zip
Merge pull request #2911 from rouault/cmake_version
CMake: align the VERSION of the library with libtool practices
-rw-r--r--CMakeLists.txt9
-rw-r--r--HOWTO-RELEASE3
2 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d561680..1f05465a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,8 +111,13 @@ message(STATUS "Configuring PROJ:")
################################################################################
include(ProjVersion)
proj_version(MAJOR 8 MINOR 2 PATCH 0)
-set(PROJ_API_VERSION "22")
-set(PROJ_BUILD_VERSION "23.0.1")
+# Use libtool convention to build the CMake's VERSION and SOVERSION
+# See https://github.com/pvanhoof/dir-examples#cmake-in-the-cmake-example
+set(PROJ_LIBTOOL_CURRENT 23)
+set(PROJ_LIBTOOL_REVISION 0)
+set(PROJ_LIBTOOL_AGE 1)
+math(EXPR PROJ_API_VERSION "${PROJ_LIBTOOL_CURRENT} - ${PROJ_LIBTOOL_AGE}")
+set(PROJ_BUILD_VERSION "${PROJ_API_VERSION}.${PROJ_LIBTOOL_AGE}.${PROJ_LIBTOOL_REVISION}")
################################################################################
# Build features and variants
diff --git a/HOWTO-RELEASE b/HOWTO-RELEASE
index cf3565c2..9005fd4b 100644
--- a/HOWTO-RELEASE
+++ b/HOWTO-RELEASE
@@ -51,8 +51,7 @@ the steps below to determine the next ABI version number:
Update the following files with the new ABI version number:
- `src/Makefile.am` Update -version-info
- - `CMakeLists.txt`: Update PROJ_BUILD_VERSION (cur:rev:age) and
- PROJ_API_VERSION (current-age)
+ - `CMakeLists.txt`: Update PROJ_LIBTOOL_CURRENT, PROJ_LIBTOOL_REVISON and PROJ_LIBTOOL_AGE
*Commit the changes to master.*