[1.5] introduce fix for the SOVERSION regression introduced in 1.5.0

This commit is contained in:
Mathieu Malaterre 2012-04-05 13:28:54 +00:00
parent da453218a4
commit b09cd38b08
1 changed files with 18 additions and 1 deletions

View File

@ -34,9 +34,26 @@ SET(OPENJPEG_VERSION
"${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}") "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}")
SET(PACKAGE_VERSION SET(PACKAGE_VERSION
"${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}") "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}")
# Because autotools does not support X.Y notation for SOVERSION, we have to use
# two numerorations, one for the openjpeg version and one for openjpeg soversion
# version | soversion
# 1.0 |  0
# 1.1 |  1
# 1.2 |  2
# 1.3 |  3
# 1.4 |  4
# 1.5 |  5
# 2.0 | 6
# above is the recommendation by the OPJ team. If you really need to override this default,
# you can specify your own OPENJPEG_SOVERSION at cmake configuration time:
# cmake -DOPENJPEG_SOVERSION:STRING=42 /path/to/openjpeg
if(NOT OPENJPEG_SOVERSION)
SET(OPENJPEG_SOVERSION 5)
endif(NOT OPENJPEG_SOVERSION)
SET(OPENJPEG_LIBRARY_PROPERTIES SET(OPENJPEG_LIBRARY_PROPERTIES
VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}" VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}"
SOVERSION "${OPENJPEG_VERSION_MAJOR}" SOVERSION "${OPENJPEG_SOVERSION}"
) )
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------