| 1 |
# This name will be used to install FCLib (library, headers, ...) and |
| 2 |
# when another lib or soft will need to search for FCLib. |
| 3 |
set(PACKAGE_NAME "FCLib") |
| 4 |
# --- Set a version number for the package --- |
| 5 |
set(MAJOR_VERSION 3) |
| 6 |
set(MINOR_VERSION 1) |
| 7 |
set(PATCH_VERSION 0) |
| 8 |
set(${PACKAGE_NAME}_version 3.1.0) |
| 9 |
set(PACKAGE_VERSION ${${PACKAGE_NAME}_version}) |
| 10 |
# ============= ABI version ============= |
| 11 |
### SOVERSION |
| 12 |
# |
| 13 |
# The ${${PACKAGE_NAME}_version} variable above indicates API |
| 14 |
# compatibility, whereas the ${PACKAGE_NAME}_SOVERSION (or SONAME), |
| 15 |
# below, indicates ABI compatibility. |
| 16 |
# |
| 17 |
# To be bumped at each release, by the following rules. If you are |
| 18 |
# not sure, likely API and ABI compatibility have both been |
| 19 |
# sacrificed, so simply bump SO_current and set the others to zero. |
| 20 |
# If an effort has been made to be backwards compatible on this |
| 21 |
# release (e.g. bug fix release), continue with the rules outlined |
| 22 |
# below. |
| 23 |
# |
| 24 |
### RULES for SONAME (borrowed from libtool) |
| 25 |
### https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html |
| 26 |
# |
| 27 |
# If the library source code has changed at all since the last update, then |
| 28 |
# increment revision (`c:r:a' becomes `c:r+1:a'). |
| 29 |
# |
| 30 |
# If any interfaces have been added, removed, or changed since the last update, |
| 31 |
# increment current, and set revision to 0. |
| 32 |
# |
| 33 |
# If any interfaces have been added since the last public release, then |
| 34 |
# increment age. |
| 35 |
# |
| 36 |
# If any interfaces have been removed since the last public release, then set |
| 37 |
# age to 0. |
| 38 |
|
| 39 |
set(SO_current 0) |
| 40 |
set(SO_revision 0) |
| 41 |
set(SO_age 0) |
| 42 |
|
| 43 |
# Aggregate variables, to be passed to linker. |
| 44 |
# libraries will be named e.g., |
| 45 |
# libfclib.so -> libfclib.so.5 -> libfclib.so.5.0.0 |
| 46 |
# Again: this is *not* the software release number! |
| 47 |
set(SO_version_info "${SO_current}:${SO_revision}:${SO_age}") |
| 48 |
math(EXPR SO_current_minus_age "(${SO_current}) - (${SO_age})") |
| 49 |
set(${PACKAGE_NAME}_SOVERSION "${SO_current_minus_age}.${SO_revision}.${SO_age}" CACHE STRING "Fclib SONAME") |
| 50 |
set(${PACKAGE_NAME}_SOVERSION_MAJOR "${SO_current_minus_age}" CACHE STRING "fclib SONAME current-minus-age") |