fixed paths to png and tiff in CMakeLists.txt and fixed link to lcms library (patch from winfried)

This commit is contained in:
Antonin Descampe 2010-10-21 09:49:54 +00:00
parent ddc9a278aa
commit b6102e207c
4 changed files with 25 additions and 26 deletions

View File

@ -5,6 +5,11 @@ What's New for OpenJPEG
! : changed ! : changed
+ : added + : added
October 20, 2010
* [antonin]
fixed paths to png and tiff in CMakeLists.txt (patch from winfried)
fixed link to lcms library (patch from winfried)
October 18, 2010 October 18, 2010
* [antonin] fixed options and help display (patch from winfried) * [antonin] fixed options and help display (patch from winfried)

View File

@ -225,11 +225,9 @@ CONFIGURE_FILE( ${OPENJPEG_SOURCE_DIR}/CMake/OpenJPEGConfig.cmake.in
INSTALL( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake INSTALL( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR} DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
) )
#
#----------------- CREATE OPJ_CONFIG.H ----------------- SET(CMAKE_PREFIX_PATH /usr /usr/local /opt /opt/local)
#
SET(CMAKE_PREFIX_PATH "/usr /usr/local /opt /opt/local")
FIND_FILE(HAVE_STRINGS_H strings.h) FIND_FILE(HAVE_STRINGS_H strings.h)
FIND_FILE(HAVE_INTTYPES_H inttypes.h) FIND_FILE(HAVE_INTTYPES_H inttypes.h)
FIND_FILE(HAVE_MEMORY_H memory.h) FIND_FILE(HAVE_MEMORY_H memory.h)
@ -238,15 +236,12 @@ FIND_FILE(HAVE_STRING_H string.h)
FIND_FILE(HAVE_SYS_STAT_H sys/stat.h) FIND_FILE(HAVE_SYS_STAT_H sys/stat.h)
FIND_FILE(HAVE_SYS_TYPES_H sys/types.h) FIND_FILE(HAVE_SYS_TYPES_H sys/types.h)
FIND_FILE(HAVE_UNISTD_H unistd.h) FIND_FILE(HAVE_UNISTD_H unistd.h)
#
# Does the system have png library installed ? # Does the system have png library installed ?
# FIND_PACKAGE not used because not robust enough # FIND_PACKAGE not used because not robust enough
#
#FIND_PACKAGE(PNG) FIND_PATH(PNG_INCLUDE_DIR png.h PATHS /usr/include /usr/include/libpng14 /usr/include/libpng12 /usr/include/libpng /usr/local/include /usr/local/include/libpng14 /usr/local/include/libpng12 /usr/local/include/libpng /opt/include /opt/include/libpng14 /opt/include/libpng12 /opt/include/libpng /opt/local/include /opt/local/include/libpng14 /opt/local/include/libpng12 /opt/local/include/libpng)
#SET(HAVE_PNG_H "${PNG_FOUND}") #
#SET(HAVE_LIBPNG "${PNG_FOUND}")
FIND_PATH(PNG_INCLUDE_DIR png.h PATHS /usr/include /usr/include/libpng14 /usr/include/libpng12 /usr/include/libpng)
IF(PNG_INCLUDE_DIR STREQUAL "PNG_INCLUDE_DIR-NOTFOUND") IF(PNG_INCLUDE_DIR STREQUAL "PNG_INCLUDE_DIR-NOTFOUND")
SET(HAVE_PNG_H 0) SET(HAVE_PNG_H 0)
ELSE() ELSE()
@ -263,14 +258,10 @@ IF(HAVE_LIBPNG AND HAVE_PNG_H)
ELSE() ELSE()
SET(PNG_FOUND 0) SET(PNG_FOUND 0)
ENDIF() ENDIF()
#
# Does the system have tiff library installed ? # Does the system have tiff library installed ?
# FIND_PACKAGE not used because not robust enough # FIND_PACKAGE not used because not robust enough
#
#FIND_PACKAGE(TIFF)
#SET(HAVE_TIFF_H "${TIFF_FOUND}")
#SET(HAVE_LIBTIFF "${TIFF_FOUND}")
FIND_PATH(TIFF_INCLUDE_DIR tiff.h) FIND_PATH(TIFF_INCLUDE_DIR tiff.h)
IF(TIFF_INCLUDE_DIR STREQUAL "TIFF_INCLUDE_DIR-NOTFOUND") IF(TIFF_INCLUDE_DIR STREQUAL "TIFF_INCLUDE_DIR-NOTFOUND")
SET(HAVE_TIFF_H 0) SET(HAVE_TIFF_H 0)
@ -288,12 +279,12 @@ IF(HAVE_LIBTIFF AND HAVE_TIFF_H)
ELSE() ELSE()
SET(TIFF_FOUND 0) SET(TIFF_FOUND 0)
ENDIF() ENDIF()
#
# Does the system have lcms library installed ? # Does the system have lcms library installed ?
#
SET(LCMS_LIB "") SET(LCMS_LIB "")
FIND_FILE(LCMS2_HEADER_FOUND lcms2.h) FIND_FILE(LCMS2_HEADER_FOUND lcms2.h)
#
IF(LCMS2_HEADER_FOUND STREQUAL "LCMS2_HEADER_FOUND-NOTFOUND") IF(LCMS2_HEADER_FOUND STREQUAL "LCMS2_HEADER_FOUND-NOTFOUND")
SET(LCMS2_HEADER_FOUND "") SET(LCMS2_HEADER_FOUND "")
ENDIF() ENDIF()
@ -327,7 +318,7 @@ IF(NOT LCMS2_HEADER_FOUND)
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
#
# generate opj_config.h # generate opj_config.h
CONFIGURE_FILE("${OPENJPEG_SOURCE_DIR}/opj_configh.cmake.in" CONFIGURE_FILE("${OPENJPEG_SOURCE_DIR}/opj_configh.cmake.in"
"${OPENJPEG_BINARY_DIR}/opj_config.h" "${OPENJPEG_BINARY_DIR}/opj_config.h"

View File

@ -1,3 +1,4 @@
ADD_DEFINITIONS(-O3)
INCLUDE_REGULAR_EXPRESSION("^.*$") INCLUDE_REGULAR_EXPRESSION("^.*$")
# Defines the source code for the library # Defines the source code for the library
SET(JP3DVM_SRCS SET(JP3DVM_SRCS

View File

@ -21,9 +21,9 @@ SET(OPENJPEG_SRCS
tgt.c tgt.c
opj_convert.c opj_convert.c
) )
IF(LCMS_INCLUDE_DIR)
INCLUDE_DIRECTORIES( ${LCMS_INCLUDE_DIR} ) INCLUDE_DIRECTORIES( ${LCMS_INCLUDE_DIR} )
ENDIF(LCMS_INCLUDE_DIR)
# Pass proper definition to preprocessor to generate shared lib # Pass proper definition to preprocessor to generate shared lib
IF(WIN32) IF(WIN32)
IF(BUILD_SHARED_LIBS) IF(BUILD_SHARED_LIBS)
@ -37,7 +37,9 @@ ENDIF(WIN32)
ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS}) ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME} PROPERTIES SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME} PROPERTIES
${OPENJPEG_LIBRARY_PROPERTIES}) ${OPENJPEG_LIBRARY_PROPERTIES})
IF(LCMS_LIB)
TARGET_LINK_LIBRARIES(${OPENJPEG_LIBRARY_NAME} ${LCMS_LIB})
ENDIF(LCMS_LIB)
# Install library # Install library
INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME} INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
EXPORT OpenJPEGTargets EXPORT OpenJPEGTargets