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.

This commit is contained in:
Francois-Olivier Devaux 2007-09-12 09:04:03 +00:00
parent 09231c317d
commit abfba20b99
4 changed files with 28 additions and 7 deletions

View File

@ -24,8 +24,9 @@ INCLUDE_REGULAR_EXPRESSION("^.*$")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# OPENJPEG version number, usefull for packaging and doxygen doc: # OPENJPEG version number, usefull for packaging and doxygen doc:
SET(OPENJPEG_SOVERSION 2)
SET(OPENJPEG_MAJOR_VERSION 1) SET(OPENJPEG_MAJOR_VERSION 1)
SET(OPENJPEG_MINOR_VERSION 0) SET(OPENJPEG_MINOR_VERSION 2)
SET(OPENJPEG_BUILD_VERSION 0) SET(OPENJPEG_BUILD_VERSION 0)
SET(OPENJPEG_VERSION SET(OPENJPEG_VERSION
"${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}") "${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}")
@ -60,12 +61,18 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
SUBDIRS( SUBDIRS(
libopenjpeg libopenjpeg
mj2 mj2
jpwl
jp3d
indexer_JPIP
# cmake 2.4.5 has poor java support # cmake 2.4.5 has poor java support
#j2kviewer/src #j2kviewer/src
) )
IF(NOT UNIX)
SUBDIRS(
jpwl
jp3d
indexer_JPIP
)
ENDIF(NOT UNIX)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Build example only if requested # Build example only if requested
IF(BUILD_EXAMPLES) IF(BUILD_EXAMPLES)
@ -102,4 +109,7 @@ FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html
$ENV{JPEG2000_CONFORMANCE_DATA_ROOT} $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)

View File

@ -6,6 +6,10 @@ What's New for OpenJPEG
+ : added + : added
September 12, 2007 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 * [FOD] Updated the MJ2 codec to be compatible with the recent changes in the OpenJPEG library
September 11, 2007 September 11, 2007

View File

@ -32,9 +32,14 @@ ENDIF(WIN32)
# Create the library # Create the library
ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS}) 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 library
INSTALL_TARGETS(/lib/ ${OPENJPEG_LIBRARY_NAME}) INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
# Install includes files # Install includes files
INSTALL_FILES(/include .h) INSTALL(FILES openjpeg.h
DESTINATION ${INCLUDE_INSTALL_DIR}/openjpeg)

View File

@ -38,3 +38,5 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(wrap_j2k_in_mj2 m) TARGET_LINK_LIBRARIES(wrap_j2k_in_mj2 m)
ENDIF(UNIX) ENDIF(UNIX)
INSTALL(TARGETS frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
DESTINATION bin)