diff --git a/CMakeLists.txt b/CMakeLists.txt index 18af55c0..2d5a7eb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 - jpwl - jp3d - indexer_JPIP # cmake 2.4.5 has poor java support #j2kviewer/src ) + +IF(NOT UNIX) +SUBDIRS( + jpwl + jp3d + indexer_JPIP + ) +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) diff --git a/ChangeLog b/ChangeLog index d681d94c..ceb369bf 100644 --- 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 diff --git a/libopenjpeg/CMakeLists.txt b/libopenjpeg/CMakeLists.txt index ceb9029f..c08d2a54 100644 --- a/libopenjpeg/CMakeLists.txt +++ b/libopenjpeg/CMakeLists.txt @@ -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) diff --git a/mj2/CMakeLists.txt b/mj2/CMakeLists.txt index d8030a71..1e884b82 100644 --- a/mj2/CMakeLists.txt +++ b/mj2/CMakeLists.txt @@ -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)