summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2007-09-25 14:54:49 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2007-09-25 14:54:49 +0000
commit6265dcfb119e80ce02a11d116ab3d06a2afa1795 (patch)
tree267acb78aca26cd20b670ef470dfea3737ee1727
parent7e40a9475a8c29239b46133ee61675fe6cc76e92 (diff)
BUG: Fix previous patch from Callum Lerwick. I have no clue what CMAKE_INSTALL_LIBDIR refers too. Bump up cmake 2.2 restriction to cmake 2.4 because of previous patch not backward compatible. Properly set the SOVERSION in a cross plateform way (yes WIN32 is a plateform)
-rw-r--r--CMakeLists.txt25
-rw-r--r--ChangeLog5
-rw-r--r--libopenjpeg/CMakeLists.txt5
3 files changed, 21 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d5a7eb8..dc3783b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@
# e.g.:
# SET(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
PROJECT(OPENJPEG C)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.2)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
IF(NOT OPENJPEG_NAMESPACE)
SET(OPENJPEG_NAMESPACE "OPENJPEG")
@@ -23,13 +23,20 @@ PROJECT(${JPEG_NAMESPACE} C)
INCLUDE_REGULAR_EXPRESSION("^.*$")
#-----------------------------------------------------------------------------
-# OPENJPEG version number, usefull for packaging and doxygen doc:
-SET(OPENJPEG_SOVERSION 2)
-SET(OPENJPEG_MAJOR_VERSION 1)
-SET(OPENJPEG_MINOR_VERSION 2)
-SET(OPENJPEG_BUILD_VERSION 0)
+# OPENJPEG version number, useful for packaging and doxygen doc:
+SET(OPENJPEG_VERSION_MAJOR 1)
+SET(OPENJPEG_VERSION_MINOR 2)
+SET(OPENJPEG_VERSION_BUILD 0)
SET(OPENJPEG_VERSION
- "${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}")
+ "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}")
+
+# This setting of SOVERSION assumes that any API change
+# will increment either the minor or major version number of openjpeg
+SET(OPENJPEG_LIBRARY_PROPERTIES
+ VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}"
+ SOVERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}"
+)
+
#-----------------------------------------------------------------------------
# OpenJPEG build configuration options.
@@ -109,7 +116,3 @@ FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html
$ENV{JPEG2000_CONFORMANCE_DATA_ROOT}
)
-IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_WARN_FLAGS "-Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wdisabled-optimization -Wfloat-equal")
- SET(CMAKE_C_FLAGS "${CMAKE_WARN_FLAGS} -ffast-math -fstrict-aliasing -std=c99 ${CMAKE_C_FLAGS}")
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
diff --git a/ChangeLog b/ChangeLog
index 5b048443..0a919d46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,11 @@ What's New for OpenJPEG
! : changed
+ : added
+September 25, 2007
+* [Mathieu Malaterre] BUG: Fix previous patch from Callum Lerwick. I have no
+ clue what CMAKE_INSTALL_LIBDIR refers too. Bump up cmake 2.2 restriction to
+ cmake 2.4 because of previous patch (not backward compatible). Properly set the SOVERSION in a cross plateform way (yes WIN32 is a platform)
+
September 19, 2007
* [Parvatha] Fixed issues with generation of SOP marker.
diff --git a/libopenjpeg/CMakeLists.txt b/libopenjpeg/CMakeLists.txt
index c08d2a54..2814ad40 100644
--- a/libopenjpeg/CMakeLists.txt
+++ b/libopenjpeg/CMakeLists.txt
@@ -33,12 +33,11 @@ ENDIF(WIN32)
# Create the library
ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME} PROPERTIES
- SOVERSION ${OPENJPEG_SOVERSION}
- VERSION ${OPENJPEG_SOVERSION}.${OPENJPEG_VERSION})
+ ${OPENJPEG_LIBRARY_PROPERTIES})
# Install library
INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ DESTINATION lib)
# Install includes files
INSTALL(FILES openjpeg.h