[trunk] V2 will be release with SOVERSION=6
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 1 Oct 2012 15:45:24 +0000 (15:45 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 1 Oct 2012 15:45:24 +0000 (15:45 +0000)
CMakeLists.txt

index 0c956efda07db0dc7ca55096ecdb4087101e751d..be5a6ae06f44f4b172dce836cba198be6c77f017 100644 (file)
@@ -35,9 +35,27 @@ set(OPENJPEG_VERSION
   "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}")
 set(PACKAGE_VERSION
   "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}")
+
+# Because autotools does not support X.Y notation for SOVERSION, we have to use
+# two numbering, 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
+#   1.5.1 |  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 6)
+endif(NOT OPENJPEG_SOVERSION)
 set(OPENJPEG_LIBRARY_PROPERTIES
   VERSION   "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}"
-  SOVERSION "${OPENJPEG_VERSION_MAJOR}"
+  SOVERSION "${OPENJPEG_SOVERSION}"
 )
 
 # --------------------------------------------------------------------------