# OPENJPEG version number, useful for packaging and doxygen doc:
SET(OPENJPEG_VERSION_MAJOR 1)
SET(OPENJPEG_VERSION_MINOR 5)
-SET(OPENJPEG_VERSION_BUILD 0)
+SET(OPENJPEG_VERSION_BUILD 2)
SET(OPENJPEG_VERSION
"${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}")
SET(PACKAGE_VERSION
# 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
+# 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
SET(OPENJPEG_INSTALL_LIB_DIR "lib")
ENDIF(NOT OPENJPEG_INSTALL_LIB_DIR)
+# The following will compute the amount of parent dir to go
+# from include to lib. it works nicely with
+# OPENJPEG_INSTALL_LIB_DIR=lib
+# OPENJPEG_INSTALL_LIB_DIR=lib/
+# OPENJPEG_INSTALL_LIB_DIR=/lib
+# OPENJPEG_INSTALL_LIB_DIR=lib/gnu-linux-x64
+STRING(REPLACE "/" ";" relative_to_lib ${OPENJPEG_INSTALL_LIB_DIR})
+set(relative_parent "..")
+foreach( elem ${relative_to_lib})
+ set( relative_parent "${relative_parent}/.." )
+endforeach()
+
IF(NOT OPENJPEG_INSTALL_SHARE_DIR)
SET(OPENJPEG_INSTALL_SHARE_DIR "share")
ENDIF(NOT OPENJPEG_INSTALL_SHARE_DIR)
PATHS
$ENV{OPJ_DATA_ROOT}
${CMAKE_SOURCE_DIR}/../data
+ ${CMAKE_SOURCE_DIR}/../../data
)
# Add repository where to find tests