Patch from Callum Lerwick. Fixed the library linking so it links with the soversion...
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 12 Sep 2007 09:04:03 +0000 (09:04 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 12 Sep 2007 09:04:03 +0000 (09:04 +0000)
CMakeLists.txt
ChangeLog
libopenjpeg/CMakeLists.txt
mj2/CMakeLists.txt

index 18af55c0bdbc83c8cf4e3d34f76d920cd4ec4bbb..2d5a7eb85fe8757a51238cdc6ff31fd5ba4826a0 100644 (file)
@@ -24,8 +24,9 @@ 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 0)
+SET(OPENJPEG_MINOR_VERSION 2)
 SET(OPENJPEG_BUILD_VERSION 0)
 SET(OPENJPEG_VERSION
   "${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}")
@@ -60,12 +61,18 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
 SUBDIRS(
   libopenjpeg
   mj2
+  # cmake 2.4.5 has poor java support
+  #j2kviewer/src
+  )
+
+IF(NOT UNIX)
+SUBDIRS(
   jpwl
   jp3d
   indexer_JPIP
-  # cmake 2.4.5 has poor java support
-  #j2kviewer/src
   )
+ENDIF(NOT UNIX)
+
 #-----------------------------------------------------------------------------
 # Build example only if requested
 IF(BUILD_EXAMPLES)
@@ -102,4 +109,7 @@ 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)
index d681d94c5ceb5d5a3f6451d8802eb3191c8f2ee4..ceb369bf9c23f4f2e3862ffef270bc702da1b677 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,10 @@ What's New for OpenJPEG
 + : added
 
 September 12, 2007
+* [FOD] Patch from Callum Lerwick.
+               Fixed the library linking so it links with the soversion properly set. 
+               Fixes up the install targets so that it interacts properly with RPM. 
+               Install target for MJ2. Sets some necessary and useful CFLAGS if gcc is in use.         
 * [FOD] Updated the MJ2 codec to be compatible with the recent changes in the OpenJPEG library
 
 September 11, 2007
index ceb9029faa832b66bb999b6d1fc7a42e49bbde98..c08d2a54fb4009151fd93ab1265225038d8ac88b 100644 (file)
@@ -32,9 +32,14 @@ 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})
 
 # Install library
-INSTALL_TARGETS(/lib/ ${OPENJPEG_LIBRARY_NAME})
+INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
+       DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
 # Install includes files
-INSTALL_FILES(/include .h)
+INSTALL(FILES openjpeg.h
+       DESTINATION ${INCLUDE_INSTALL_DIR}/openjpeg)
index d8030a7118fd7766d8dc6b6cca8497bca11d8674..1e884b8221f95d29b3cf8267ad7a90f416eed996 100644 (file)
@@ -38,3 +38,5 @@ IF(UNIX)
   TARGET_LINK_LIBRARIES(wrap_j2k_in_mj2 m)
 ENDIF(UNIX)
 
+INSTALL(TARGETS frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
+       DESTINATION bin)