#-----------------------------------------------------------------------------
# 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}")
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)
$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)
+ : 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
# 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)