Minor tweaks to cmake files

This commit is contained in:
Mathieu Malaterre 2010-06-21 11:50:46 +00:00
parent f509865242
commit 1f348833dd
7 changed files with 26 additions and 39 deletions

View File

@ -0,0 +1,3 @@
SET(CMAKE_MODULE_PATH "${OPENJPEG_SOURCE_DIR}/CMake")
FIND_PACKAGE(FreeImage REQUIRED)
ADD_DEFINITIONS ( -DFREEIMAGE_LIB )

View File

@ -47,7 +47,7 @@ INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
#-----------------------------------------------------------------------------
# Setup file for setting custom ctest vars
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CTestCustom.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake
@ONLY
)
@ -88,13 +88,12 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/opj_configure.h.in
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
SUBDIRS(
libopenjpeg
codec
test_V2_tile_handling
test_Free_image_V2_tile_handling
# mj2
# cmake 2.4.5 has poor java support
#j2kviewer/src
)
IF(BUILD_EXAMPLES)
SUBDIRS(codec)
ENDIF(BUILD_EXAMPLES)
#IF(NOT UNIX)
#SUBDIRS(
@ -104,12 +103,6 @@ SUBDIRS(
# )
#ENDIF(NOT UNIX)
#-----------------------------------------------------------------------------
# Build example only if requested
#IF(BUILD_EXAMPLES)
# SUBDIRS(codec)
#ENDIF(BUILD_EXAMPLES)
#-----------------------------------------------------------------------------
# For the documentation
OPTION(BUILD_DOCUMENTATION "Build the doxygen documentation" OFF)
@ -119,15 +112,18 @@ ENDIF(BUILD_DOCUMENTATION)
#-----------------------------------------------------------------------------
# For openjpeg team if they ever want Dart+CMake
IF(OPENJPEG_STANDALONE)
OPTION(BUILD_TESTING "Build the tests." OFF)
IF(BUILD_TESTING)
ENABLE_TESTING()
INCLUDE(CTest)
#MARK_AS_ADVANCED(BUILD_TESTING DART_ROOT TCL_TCLSH)
IF(BUILD_TESTING)
ENABLE_TESTING()
SET(BUILDNAME "OpenJPEG-${CMAKE_SYSTEM}-${CMAKE_C_COMPILER}" CACHE STRING "Name of build on the dashboard")
MARK_AS_ADVANCED(BUILDNAME)
ENDIF(BUILD_TESTING)
ENDIF(OPENJPEG_STANDALONE)
ENDIF(BUILD_TESTING)
IF(BUILD_TESTING)
SUBDIRS(
test_V2_tile_handling
test_Free_image_V2_tile_handling
)
ENDIF(BUILD_TESTING)
# Adding test with dataset from:
# http://www.crc.ricoh.com/~gormish/jpeg2000conformance/

View File

@ -5,6 +5,10 @@ What's New for OpenJPEG
! : changed
+ : added
Jun 21, 2010
* [MM] Move CMake files to CMake folder
* [MM] Remove some warnings in code
April 8, 2010
* [FOD] Fixed problem with Borland C++ Builder (Borland C do not have lrintf). Thanks Marek Mauder for this fix.
* [FOD] Fixed pi.c bug (issue 15 on google code). Thanks to Anton Lionel for catching this.

View File

@ -1,18 +0,0 @@
# Import library
#________________
# MESSAGE(STATUS "IMPORT : FreeImagelibrary")
# Include directories
INCLUDE_DIRECTORIES(${OPENJPEG_SOURCE_DIR}/libs/FreeImage)
# Link libraries
IF(WIN32)
LINK_DIRECTORIES(${OPENJPEG_SOURCE_DIR}/libs/FreeImage)
LINK_LIBRARIES(freeimage.s)
ELSE(WIN32)
LINK_LIBRARIES(freeimage)
ENDIF(WIN32)
ADD_DEFINITIONS ( -DFREEIMAGE_LIB )

View File

@ -1260,7 +1260,8 @@ opj_image_t* pnmtoimage(const char *filename, opj_cparameters_t *parameters) {
int imagetopnm(opj_image_t * image, const char *outfile) {
int w, wr, h, hr, max;
int i, compno;
int i;
unsigned int compno;
int adjustR, adjustG, adjustB, adjustX;
FILE *fdest = NULL;
char S2;

View File

@ -16,13 +16,14 @@ IF(NOT BUILD_SHARED_LIBS)
ADD_DEFINITIONS(-DOPJ_STATIC)
ENDIF(NOT BUILD_SHARED_LIBS)
INCLUDE(${OPENJPEG_SOURCE_DIR}/Free_CMakeImport.cmake)
INCLUDE(${OPENJPEG_SOURCE_DIR}/CMake/Free_CMakeImport.cmake)
# Loop over all executables:
FOREACH(exe test2_encoder test2_decoder)
ADD_EXECUTABLE(${exe} ${exe}.c)
TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg)
TARGET_LINK_LIBRARIES(${exe} ${FREEIMAGE_LIBRARIES})
# Install exe
INSTALL_TARGETS(/bin/ ${exe})
ENDFOREACH(exe)