diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-10-22 18:17:38 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-10-22 18:17:38 +0200 |
| commit | 5a47650a5bdbffe5a877164857d40ae28babf6eb (patch) | |
| tree | 68d18b7db1052f59a547113b7d983efb2de23f52 /CMakeLists.txt | |
| parent | 01d503cb23b4cffe4435c1e915c4d0661bb16d74 (diff) | |
| download | PROJ-5a47650a5bdbffe5a877164857d40ae28babf6eb.tar.gz PROJ-5a47650a5bdbffe5a877164857d40ae28babf6eb.zip | |
CMake: align the VERSION of the library with libtool practices
Currently (at least as of 8.1.1) we don't have the same .so.x.y.z
numbers for the libtool and cmake builds (the y and z are swapped for
the cmake build). While only the SONAME (the .x part) mostly matters,
it is probably better to stick with the libtool convention to determine
the y and z.
This patch should make it easier by setting explicitly each of the
current, revision, age and computing automatically
x = current - age
y = age
z = revision
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 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 |
