changed the directory hierarchy of the whole project. See README files for details.

This commit is contained in:
Antonin Descampe 2011-04-13 22:38:50 +00:00
parent 16f205d886
commit 6aaaa3eae2
24 changed files with 318 additions and 365 deletions

View File

@ -6,6 +6,7 @@ What's New for OpenJPEG
+ : added + : added
April 13, 2011 April 13, 2011
! [antonin] changed the directory hierarchy of the whole project. See README files for details.
! [antonin] moved "openjpeg3d" directory from the trunk to the branches directory. ! [antonin] moved "openjpeg3d" directory from the trunk to the branches directory.
! [antonin] renamed and reorganized "jp3d" directory to "openjpeg3d". Is now a standalone directory, with independent cmake files. Done as it uses its own version of the openjpeg library and does not depend on the one currently developped. Will be removed from the trunk and stored in a branch. ! [antonin] renamed and reorganized "jp3d" directory to "openjpeg3d". Is now a standalone directory, with independent cmake files. Done as it uses its own version of the openjpeg library and does not depend on the one currently developped. Will be removed from the trunk and stored in a branch.

View File

@ -38,12 +38,6 @@ SET(OPENJPEG_LIBRARY_PROPERTIES
VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}" VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}"
SOVERSION "${OPENJPEG_VERSION_MAJOR}" SOVERSION "${OPENJPEG_VERSION_MAJOR}"
) )
# You will also need to define a value for the following variables:
# OPENJPEG_INSTALL_BIN_DIR - binary dir (executables)
# OPENJPEG_INSTALL_LIB_DIR - library dir (libs)
# OPENJPEG_INSTALL_DATA_DIR - share dir (say, examples, data, etc)
# OPENJPEG_INSTALL_INCLUDE_DIR - include dir (headers)
# On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security # On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security
# warnings # warnings
@ -75,7 +69,7 @@ ENDIF(WIN32)
# Install directories # Install directories
STRING(TOLOWER ${PROJECT_NAME} projectname) STRING(TOLOWER ${PROJECT_NAME} projectname)
SET(subdir "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}") SET(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
IF(NOT OPENJPEG_INSTALL_BIN_DIR) IF(NOT OPENJPEG_INSTALL_BIN_DIR)
SET(OPENJPEG_INSTALL_BIN_DIR "bin") SET(OPENJPEG_INSTALL_BIN_DIR "bin")
@ -86,7 +80,7 @@ IF(NOT OPENJPEG_INSTALL_LIB_DIR)
ENDIF(NOT OPENJPEG_INSTALL_LIB_DIR) ENDIF(NOT OPENJPEG_INSTALL_LIB_DIR)
IF(NOT OPENJPEG_INSTALL_DATA_DIR) IF(NOT OPENJPEG_INSTALL_DATA_DIR)
SET(OPENJPEG_INSTALL_DATA_DIR "share/${subdir}") SET(OPENJPEG_INSTALL_DATA_DIR "share/${OPENJPEG_INSTALL_SUBDIR}")
ENDIF(NOT OPENJPEG_INSTALL_DATA_DIR) ENDIF(NOT OPENJPEG_INSTALL_DATA_DIR)
IF(NOT OPENJPEG_INSTALL_INCLUDE_DIR) IF(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
@ -98,11 +92,11 @@ IF(NOT OPENJPEG_INSTALL_MAN_DIR)
ENDIF(NOT OPENJPEG_INSTALL_MAN_DIR) ENDIF(NOT OPENJPEG_INSTALL_MAN_DIR)
IF(NOT OPENJPEG_INSTALL_DOC_DIR) IF(NOT OPENJPEG_INSTALL_DOC_DIR)
SET(OPENJPEG_INSTALL_DOC_DIR "share/doc/${subdir}") SET(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
ENDIF(NOT OPENJPEG_INSTALL_DOC_DIR) ENDIF(NOT OPENJPEG_INSTALL_DOC_DIR)
IF(NOT OPENJPEG_INSTALL_PACKAGE_DIR) IF(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
SET(OPENJPEG_INSTALL_PACKAGE_DIR ${OPENJPEG_INSTALL_LIB_DIR}/${subdir} SET(OPENJPEG_INSTALL_PACKAGE_DIR ${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}
CACHE INTERNAL "") CACHE INTERNAL "")
ENDIF(NOT OPENJPEG_INSTALL_PACKAGE_DIR) ENDIF(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
@ -112,26 +106,24 @@ INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Test for getopt being available in this system # Test for getopt being available in this system
INCLUDE (${PROJECT_SOURCE_DIR}/CMake/CheckHaveGetopt.cmake ) INCLUDE (${OPENJPEG_SOURCE_DIR}/CMake/CheckHaveGetopt.cmake )
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Setup file for setting custom ctest vars # Setup file for setting custom ctest vars
CONFIGURE_FILE( CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CTestCustom.cmake.in ${CMAKE_SOURCE_DIR}/testing/CTestCustom.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR}/testing/CTestCustom.cmake
@ONLY @ONLY
) )
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# OpenJPEG build configuration options. # OpenJPEG build configuration options.
OPTION(BUILD_SHARED_LIBS "Build OpenJPEG shared library and link executables against it." ON) OPTION(BUILD_SHARED_LIBS "Build OpenJPEG shared library and link executables against it." ON)
#-----------------------------------------------------------------------------
SET (EXECUTABLE_OUTPUT_PATH ${OPENJPEG_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.") SET (EXECUTABLE_OUTPUT_PATH ${OPENJPEG_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.")
SET (LIBRARY_OUTPUT_PATH ${OPENJPEG_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") SET (LIBRARY_OUTPUT_PATH ${OPENJPEG_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
#-----------------------------------------------------------------------------
# configure name mangling to allow multiple libraries to coexist # configure name mangling to allow multiple libraries to coexist
# peacefully # peacefully
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in) IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in)
@ -148,50 +140,6 @@ INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpeg1.pc DESTINATION ${OPENJP
INSTALL( CODE INSTALL( CODE
"EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink \"libopenjpeg1.pc\" \"\$ENV{DESTDIR}${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig/libopenjpeg.pc\")") "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink \"libopenjpeg1.pc\" \"\$ENV{DESTDIR}${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig/libopenjpeg.pc\")")
#-----------------------------------------------------------------------------
# Always build the library
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
SUBDIRS(libopenjpeg)
#-----------------------------------------------------------------------------
# Build CODEC executables ?
OPTION(BUILD_CODEC "Build the CODEC executables" ON)
#-----------------------------------------------------------------------------
# Build MJ2 executables ?
OPTION(BUILD_MJ2 "Build the MJ2 executables." OFF)
#-----------------------------------------------------------------------------
# Build JPWL executables ?
OPTION(BUILD_JPWL "Build the JPWL executables" OFF)
#-----------------------------------------------------------------------------
# Build INDEXER_JPIP executables ?
OPTION(BUILD_INDEXER_JPIP "Build the INDEXER_JPIP executables" OFF)
#-----------------------------------------------------------------------------
# Build DOCUMENTATION ?
OPTION(BUILD_DOC "Build the doxygen documentation" OFF)
#-----------------------------------------------------------------------------
# For openjpeg team if they ever want CDash+CMake
OPTION(BUILD_TESTING "Build the tests." OFF)
IF(BUILD_TESTING)
ENABLE_TESTING()
INCLUDE(CTest)
ENDIF(BUILD_TESTING)
# Adding test with dataset from:
# http://www.crc.ricoh.com/~gormish/jpeg2000conformance/
# -> wget http://www.crc.ricoh.com/~gormish/jpeg2000conformance/j2kp4files_v1_5.zip
# http://www.jpeg.org/jpeg2000guide/testimages/testimages.html
#-----------------------------------------------------------------------------
# Adding JPEG2000_CONFORMANCE_DATA_ROOT
FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html
${OPENJPEG_SOURCE_DIR}/../jpeg2000testimages
$ENV{JPEG2000_CONFORMANCE_DATA_ROOT}
)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Compiler specific flags: # Compiler specific flags:
IF(CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_COMPILER_IS_GNUCC)
@ -201,21 +149,8 @@ IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS_RELEASE "-ffast-math ${CMAKE_C_FLAGS_RELEASE}") SET(CMAKE_C_FLAGS_RELEASE "-ffast-math ${CMAKE_C_FLAGS_RELEASE}")
ENDIF(CMAKE_COMPILER_IS_GNUCC) ENDIF(CMAKE_COMPILER_IS_GNUCC)
# install all targets referenced as OPENJPEGTargets #-----------------------------------------------------------------------------
install(EXPORT OpenJPEGTargets DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}) # opj_config.h generation
CONFIGURE_FILE( ${OPENJPEG_SOURCE_DIR}/CMake/OpenJPEGConfig.cmake.in
${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
@ONLY
)
INSTALL( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
)
# install CHANGES and LICENSE
INSTALL(
FILES CHANGES
LICENSE
DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
#
FIND_FILE(HAVE_STRINGS_H_FOUND strings.h) FIND_FILE(HAVE_STRINGS_H_FOUND strings.h)
IF(NOT HAVE_STRINGS_H_FOUND STREQUAL "HAVE_STRINGS_H_FOUND-NOTFOUND") IF(NOT HAVE_STRINGS_H_FOUND STREQUAL "HAVE_STRINGS_H_FOUND-NOTFOUND")
FIND_FILE(HAVE_STRINGS_H strings.h) FIND_FILE(HAVE_STRINGS_H strings.h)
@ -261,151 +196,65 @@ IF(NOT HAVE_UNISTD_H_FOUND STREQUAL "HAVE_UNISTD_H_FOUND-NOTFOUND")
FIND_FILE(HAVE_UNISTD_H unistd.h) FIND_FILE(HAVE_UNISTD_H unistd.h)
SET(HAS_UNISTD_H 1) SET(HAS_UNISTD_H 1)
ENDIF() ENDIF()
#
IF(BUILD_CODEC OR BUILD_JPWL OR BUILD_MJ2)
#
#
IF(UNIX OR CYGWIN)
SET(CMAKE_INCLUDE_PATH /usr/include /usr/local/include /opt/include
/opt/local/include /usr/include/libpng /usr/include/libpng14
/usr/include/libpng12 /usr/local/include/libpng
/usr/local/include/libpng14 /usr/local/include/libpng12
/opt/include/libpng /opt/include/libpng14 /opt/include/libpng12
/opt/local/include/libpng /opt/local/include/libpng14)
SET(CMAKE_LIBRARY_PATH /usr/lib /usr/local/lib /opt/lib /opt/local/lib)
ENDIF()
#
FIND_PACKAGE(ZLIB)
#
IF(ZLIB_LIBRARY STREQUAL "ZLIB_LIBRARY-NOTFOUND")
SET(ZLIB_FOUND 0)
ENDIF(ZLIB_LIBRARY STREQUAL "ZLIB_LIBRARY-NOTFOUND")
#
IF(ZLIB_FOUND)
SET(HAVE_ZLIB_H 1)
SET(HABE_LIBZ 1)
SET(Z_LIBNAME ${ZLIB_LIBRARIES})
SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIR})
ENDIF(ZLIB_FOUND)
#
FIND_PACKAGE(PNG)
#
IF(PNG_LIBRARY STREQUAL "PNG_LIBRARY-NOTFOUND")
SET(PNG_FOUND 0)
ENDIF(PNG_LIBRARY STREQUAL "PNG_LIBRARY-NOTFOUND")
#
IF(PNG_FOUND)
SET(HAVE_PNG_H 1)
SET(HAVE_LIBPNG 1)
SET(PNG_LIBNAME ${PNG_LIBRARIES})
SET(PNG_INCLUDE_DIRNAME ${PNG_INCLUDE_DIR})
ENDIF(PNG_FOUND)
#
FIND_PACKAGE(TIFF)
#
IF(TIFF_LIBRARY STREQUAL "TIFF_LIBRARY-NOTFOUND")
SET(TIFF_FOUND 0)
ENDIF(TIFF_LIBRARY STREQUAL "TIFF_LIBRARY-NOTFOUND")
#
IF(TIFF_FOUND)
SET(HAVE_TIFF_H 1)
SET(HAVE_LIBTIFF 1)
SET(TIFF_LIBNAME ${TIFF_LIBRARIES})
SET(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR})
ENDIF(TIFF_FOUND)
#
SET(LCMS12_MISSING 1)
INCLUDE(thirdparty/FindLCMS2.cmake OPTIONAL)
#
IF(LCMS2_FOUND)
SET(LCMS12_MISSING 0)
SET(HAVE_LCMS2_H 1)
SET(HAVE_LIBLCMS2 1)
SET(LCMS_LIBNAME ${LCMS2_LIBRARY})
SET(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIR})
ENDIF(LCMS2_FOUND)
#
IF(NOT LCMS2_FOUND)
INCLUDE(thirdparty/FindLCMS.cmake OPTIONAL)
#
IF(LCMS_FOUND)
SET(LCMS12_MISSING 0)
SET(HAVE_LCMS1_H 1)
SET(HAVE_LIBLCMS1 1)
SET(LCMS_LIBNAME ${LCMS_LIBRARY} )
SET(LCMS_INCLUDE_DIRNAME ${LCMS_INCLUDE_DIR})
ENDIF(LCMS_FOUND)
ENDIF(NOT LCMS2_FOUND)
#-------------------------------------------------------------
OPTION(BUILD_THIRDPARTY "Build the thirdparty executables" ON)
#
IF(NOT ZLIB_FOUND OR NOT PNG_FOUND OR NOT TIFF_FOUND OR LCMS12_MISSING)
IF(BUILD_THIRDPARTY)
SET(HAVE_ZLIB_H 1)
SET(HAVE_LIBZ 1)
SET(HAVE_PNG_H 1)
SET(HAVE_LIBPNG 1)
SET(HAVE_TIFF_H 1)
SET(HAVE_LIBTIFF 1)
SET(HAVE_LCMS2_H 1)
SET(HAVE_LIBLCMS2 1)
#
ADD_SUBDIRECTORY(${OPENJPEG_SOURCE_DIR}/thirdparty)
#
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/thirdparty/lib)
#
IF(NOT ZLIB_FOUND)
INCLUDE_DIRECTORIES(${OPENJPEG_SOURCE_DIR}/thirdparty/include)
SET(ZLIB_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/include)
SET(Z_LIBNAME z)
SET(ZLIB_FOUND 1)
ENDIF(NOT ZLIB_FOUND)
#
IF(NOT PNG_FOUND)
SET(PNG_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/libpng)
SET(PNG_LIBNAME png)
SET(PNG_FOUND 1)
ENDIF(NOT PNG_FOUND)
#
IF(NOT LCMS_FOUND AND NOT LCMS2_FOUND)
SET(LCMS_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/liblcms2/include)
SET(LCMS_LIBNAME lcms2)
SET(LCMS2_FOUND 1)
ENDIF(NOT LCMS_FOUND AND NOT LCMS2_FOUND)
#
IF(NOT TIFF_FOUND)
SET(TIFF_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/libtiff)
SET(TIFF_LIBNAME tiff)
SET(TIFF_FOUND 1)
ENDIF(NOT TIFF_FOUND)
#
ENDIF(BUILD_THIRDPARTY)
ENDIF(NOT ZLIB_FOUND OR NOT PNG_FOUND OR NOT TIFF_FOUND OR LCMS12_MISSING)
#
ENDIF(BUILD_CODEC OR BUILD_JPWL OR BUILD_MJ2)
#
IF(BUILD_CODEC)
SUBDIRS(codec)
ENDIF(BUILD_CODEC)
#
IF(BUILD_MJ2)
SUBDIRS(mj2)
ENDIF(BUILD_MJ2)
#
IF(BUILD_JPWL)
SUBDIRS(jpwl)
ENDIF(BUILD_JPWL)
#
IF(BUILD_INDEXER_JPIP)
SUBDIRS(indexer_JPIP)
ENDIF(BUILD_INDEXER_JPIP)
#
IF(BUILD_DOC)
SUBDIRS(doc)
ENDIF(BUILD_DOC)
#
# 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"
@ONLY @ONLY
)
#-----------------------------------------------------------------------------
# Build Library
INCLUDE_DIRECTORIES(BEFORE ${OPENJPEG_BINARY_DIR})
ADD_SUBDIRECTORY(libopenjpeg)
#-----------------------------------------------------------------------------
# Build Applications
OPTION(BUILD_CODEC "Build the CODEC executables" ON)
OPTION(BUILD_MJ2 "Build the MJ2 executables." OFF)
OPTION(BUILD_INDEXER_JPIP "Build the INDEXER_JPIP executables" OFF)
ADD_SUBDIRECTORY(applications)
#-----------------------------------------------------------------------------
# Build JPWL-flavoured library and executables
OPTION(BUILD_JPWL "Build the JPWL library and executables" OFF)
#-----------------------------------------------------------------------------
# Build DOCUMENTATION
OPTION(BUILD_DOC "Build the doxygen documentation" OFF)
IF(BUILD_DOC)
ADD_SUBDIRECTORY(doc)
ENDIF(BUILD_DOC)
#-----------------------------------------------------------------------------
# CDash+CMake : to be updated
OPTION(BUILD_TESTING "Build the tests." OFF)
IF(BUILD_TESTING)
ENABLE_TESTING()
INCLUDE(CTest)
ENDIF(BUILD_TESTING)
# Adding test with dataset from:
# http://www.crc.ricoh.com/~gormish/jpeg2000conformance/
# -> wget http://www.crc.ricoh.com/~gormish/jpeg2000conformance/j2kp4files_v1_5.zip
# http://www.jpeg.org/jpeg2000guide/testimages/testimages.html
# Adding JPEG2000_CONFORMANCE_DATA_ROOT
FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html
${OPENJPEG_SOURCE_DIR}/../jpeg2000testimages
$ENV{JPEG2000_CONFORMANCE_DATA_ROOT}
) )
#-----------------------------------------------------------------------------
# install all targets referenced as OPENJPEGTargets
INSTALL(EXPORT OpenJPEGTargets DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR})
CONFIGURE_FILE( ${OPENJPEG_SOURCE_DIR}/CMake/OpenJPEGConfig.cmake.in
${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
@ONLY
)
INSTALL( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
)
#-----------------------------------------------------------------------------
# install CHANGES and LICENSE
INSTALL(
FILES CHANGES
LICENSE
DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})

View File

@ -1,21 +0,0 @@
#
# For further details regarding this file,
# see http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
#
SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 50)
SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 50)
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
# Exclude files from the Testing directories
".*/Testing/.*"
)
SET(CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
# Suppress warning caused by intentional messages about deprecation
".*warning,.* is deprecated"
)

22
README
View File

@ -1 +1,23 @@
OPENJPEG LIBRARY and APPLICATIONS
----------------------------------
Details on folders hierarchy:
* libopenjpeg: contains the sources of the openjpeg library
* jpwl: contains the additional sources if you want to build a JPWL-flavoured library.
* applications: contains all applications that use the openjpeg library
* common: common files to all applications
* codec: a basic codec
* mj2: motion jpeg 2000 executables
* JavaOpenJPEG: java jni to use openjpeg in a java program
* indexer_JPIP: obsolete. Will be replaced by a complete JPIP implementation soon.
* OPJViewer: gui for displaying j2k files (based on wxWidget)
* thirdparty: thirdparty libraries used by some applications. These libraries will be build only if there are not found on the system. Note that libopenjpeg itself does not have any dependency.
* doc: doxygen documentation setup file and man pages
* testing: all files required to test the library and executables (obsolete)
* CMake: cmake related files
* m4: autotools related files
see LICENSE for license and copyright information
see INSTALL for installation procedures. see INSTALL for installation procedures.

134
applications/CMakeLists.txt Normal file
View File

@ -0,0 +1,134 @@
IF(BUILD_CODEC OR BUILD_MJ2)
#
#
IF(UNIX OR CYGWIN)
SET(CMAKE_INCLUDE_PATH /usr/include /usr/local/include /opt/include
/opt/local/include /usr/include/libpng /usr/include/libpng14
/usr/include/libpng12 /usr/local/include/libpng
/usr/local/include/libpng14 /usr/local/include/libpng12
/opt/include/libpng /opt/include/libpng14 /opt/include/libpng12
/opt/local/include/libpng /opt/local/include/libpng14)
SET(CMAKE_LIBRARY_PATH /usr/lib /usr/local/lib /opt/lib /opt/local/lib)
ENDIF()
#
FIND_PACKAGE(ZLIB)
#
IF(ZLIB_LIBRARY STREQUAL "ZLIB_LIBRARY-NOTFOUND")
SET(ZLIB_FOUND 0)
ENDIF(ZLIB_LIBRARY STREQUAL "ZLIB_LIBRARY-NOTFOUND")
#
IF(ZLIB_FOUND)
SET(HAVE_ZLIB_H 1)
SET(HABE_LIBZ 1)
SET(Z_LIBNAME ${ZLIB_LIBRARIES})
SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIR})
ENDIF(ZLIB_FOUND)
#
FIND_PACKAGE(PNG)
#
IF(PNG_LIBRARY STREQUAL "PNG_LIBRARY-NOTFOUND")
SET(PNG_FOUND 0)
ENDIF(PNG_LIBRARY STREQUAL "PNG_LIBRARY-NOTFOUND")
#
IF(PNG_FOUND)
SET(HAVE_PNG_H 1)
SET(HAVE_LIBPNG 1)
SET(PNG_LIBNAME ${PNG_LIBRARIES})
SET(PNG_INCLUDE_DIRNAME ${PNG_INCLUDE_DIR})
ENDIF(PNG_FOUND)
#
FIND_PACKAGE(TIFF)
#
IF(TIFF_LIBRARY STREQUAL "TIFF_LIBRARY-NOTFOUND")
SET(TIFF_FOUND 0)
ENDIF(TIFF_LIBRARY STREQUAL "TIFF_LIBRARY-NOTFOUND")
#
IF(TIFF_FOUND)
SET(HAVE_TIFF_H 1)
SET(HAVE_LIBTIFF 1)
SET(TIFF_LIBNAME ${TIFF_LIBRARIES})
SET(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR})
ENDIF(TIFF_FOUND)
#
SET(LCMS12_MISSING 1)
INCLUDE(${OPENJPEG_SOURCE_DIR}/thirdparty/FindLCMS2.cmake OPTIONAL)
#
IF(LCMS2_FOUND)
SET(LCMS12_MISSING 0)
SET(HAVE_LCMS2_H 1)
SET(HAVE_LIBLCMS2 1)
SET(LCMS_LIBNAME ${LCMS2_LIBRARY})
SET(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIR})
ENDIF(LCMS2_FOUND)
#
IF(NOT LCMS2_FOUND)
INCLUDE(${OPENJPEG_SOURCE_DIR}/thirdparty/FindLCMS.cmake OPTIONAL)
#
IF(LCMS_FOUND)
SET(LCMS12_MISSING 0)
SET(HAVE_LCMS1_H 1)
SET(HAVE_LIBLCMS1 1)
SET(LCMS_LIBNAME ${LCMS_LIBRARY} )
SET(LCMS_INCLUDE_DIRNAME ${LCMS_INCLUDE_DIR})
ENDIF(LCMS_FOUND)
ENDIF(NOT LCMS2_FOUND)
#-------------------------------------------------------------
OPTION(BUILD_THIRDPARTY "Build the thirdparty executables" ON)
#
IF(NOT ZLIB_FOUND OR NOT PNG_FOUND OR NOT TIFF_FOUND OR LCMS12_MISSING)
IF(BUILD_THIRDPARTY)
SET(HAVE_ZLIB_H 1)
SET(HAVE_LIBZ 1)
SET(HAVE_PNG_H 1)
SET(HAVE_LIBPNG 1)
SET(HAVE_TIFF_H 1)
SET(HAVE_LIBTIFF 1)
SET(HAVE_LCMS2_H 1)
SET(HAVE_LIBLCMS2 1)
#
ADD_SUBDIRECTORY(${OPENJPEG_SOURCE_DIR}/thirdparty)
#
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/thirdparty/lib)
#
IF(NOT ZLIB_FOUND)
INCLUDE_DIRECTORIES(${OPENJPEG_SOURCE_DIR}/thirdparty/include)
SET(ZLIB_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/include)
SET(Z_LIBNAME z)
SET(ZLIB_FOUND 1)
ENDIF(NOT ZLIB_FOUND)
#
IF(NOT PNG_FOUND)
SET(PNG_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/libpng)
SET(PNG_LIBNAME png)
SET(PNG_FOUND 1)
ENDIF(NOT PNG_FOUND)
#
IF(NOT LCMS_FOUND AND NOT LCMS2_FOUND)
SET(LCMS_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/liblcms2/include)
SET(LCMS_LIBNAME lcms2)
SET(LCMS2_FOUND 1)
ENDIF(NOT LCMS_FOUND AND NOT LCMS2_FOUND)
#
IF(NOT TIFF_FOUND)
SET(TIFF_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/libtiff)
SET(TIFF_LIBNAME tiff)
SET(TIFF_FOUND 1)
ENDIF(NOT TIFF_FOUND)
#
ENDIF(BUILD_THIRDPARTY)
ENDIF(NOT ZLIB_FOUND OR NOT PNG_FOUND OR NOT TIFF_FOUND OR LCMS12_MISSING)
#
ENDIF(BUILD_CODEC OR BUILD_MJ2)
#
IF(BUILD_CODEC)
ADD_SUBDIRECTORY(codec)
ENDIF(BUILD_CODEC)
#
IF(BUILD_MJ2)
ADD_SUBDIRECTORY(mj2)
ENDIF(BUILD_MJ2)
#
IF(BUILD_INDEXER_JPIP)
ADD_SUBDIRECTORY(indexer_JPIP)
ENDIF(BUILD_INDEXER_JPIP)
#

View File

@ -4,14 +4,14 @@
SET(common_SRCS SET(common_SRCS
convert.c convert.c
index.c index.c
${OPENJPEG_SOURCE_DIR}/common/color.c ${OPENJPEG_SOURCE_DIR}/applications/common/color.c
) )
# If not getopt was found then add it to the lib: # If not getopt was found then add it to the lib:
IF(DONT_HAVE_GETOPT) IF(DONT_HAVE_GETOPT)
SET(common_SRCS SET(common_SRCS
${common_SRCS} ${common_SRCS}
${OPENJPEG_SOURCE_DIR}/common/getopt.c ${OPENJPEG_SOURCE_DIR}/applications/common/getopt.c
) )
ENDIF(DONT_HAVE_GETOPT) ENDIF(DONT_HAVE_GETOPT)
@ -19,7 +19,7 @@ ENDIF(DONT_HAVE_GETOPT)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${OPENJPEG_SOURCE_DIR}/libopenjpeg ${OPENJPEG_SOURCE_DIR}/libopenjpeg
${LCMS_INCLUDE_DIRNAME} ${LCMS_INCLUDE_DIRNAME}
${OPENJPEG_SOURCE_DIR}/common ${OPENJPEG_SOURCE_DIR}/applications/common
${Z_INCLUDE_DIRNAME} ${Z_INCLUDE_DIRNAME}
${PNG_INCLUDE_DIRNAME} ${PNG_INCLUDE_DIRNAME}
${TIFF_INCLUDE_DIRNAME} ${TIFF_INCLUDE_DIRNAME}
@ -55,12 +55,42 @@ ENDFOREACH(exe)
# Install man pages # Install man pages
INSTALL( INSTALL(
FILES ../doc/man/man1/image_to_j2k.1 FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/image_to_j2k.1
../doc/man/man1/j2k_dump.1 ${OPENJPEG_SOURCE_DIR}/doc/man/man1/j2k_dump.1
../doc/man/man1/j2k_to_image.1 ${OPENJPEG_SOURCE_DIR}/doc/man/man1/j2k_to_image.1
DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1) DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
# #
IF(BUILD_JPWL)
ADD_EXECUTABLE(JPWL_j2k_to_image
j2k_to_image.c
${common_SRCS}
)
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image ${OPENJPEG_LIBRARY_NAME}_JPWL
${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
#
IF(UNIX)
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image m)
ENDIF(UNIX)
ADD_EXECUTABLE(JPWL_image_to_j2k
image_to_j2k.c
${common_SRCS}
)
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k ${OPENJPEG_LIBRARY_NAME}_JPWL
${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
#
IF(UNIX)
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k m)
ENDIF(UNIX)
INSTALL(TARGETS JPWL_image_to_j2k JPWL_j2k_to_image
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
)
ENDIF(BUILD_JPWL)
if(BUILD_TESTING) if(BUILD_TESTING)
# Do testing here, once we know the examples are being built: # Do testing here, once we know the examples are being built:
FILE(GLOB_RECURSE OPENJPEG_DATA_IMAGES_GLOB FILE(GLOB_RECURSE OPENJPEG_DATA_IMAGES_GLOB

View File

@ -45,7 +45,7 @@
#include <png.h> #include <png.h>
#endif /* HAVE_LIBPNG */ #endif /* HAVE_LIBPNG */
#include "../libopenjpeg/openjpeg.h" #include "openjpeg.h"
#include "convert.h" #include "convert.h"
/* /*

View File

@ -45,8 +45,8 @@
#include "opj_config.h" #include "opj_config.h"
#include "openjpeg.h" #include "openjpeg.h"
#include "../libopenjpeg/j2k.h" #include "j2k.h"
#include "../libopenjpeg/jp2.h" #include "jp2.h"
#include "getopt.h" #include "getopt.h"
#include "convert.h" #include "convert.h"
#include "index.h" #include "index.h"

View File

@ -2,7 +2,7 @@
SET(common_SRCS "") SET(common_SRCS "")
IF(DONT_HAVE_GETOPT) IF(DONT_HAVE_GETOPT)
SET(common_SRCS ${OPENJPEG_SOURCE_DIR}/common/getopt.c) SET(common_SRCS ${OPENJPEG_SOURCE_DIR}/applications/common/getopt.c)
ENDIF(DONT_HAVE_GETOPT) ENDIF(DONT_HAVE_GETOPT)
# While mj2 executables do not use the API correctly, we do not link with the library but rather compile the sources files. # While mj2 executables do not use the API correctly, we do not link with the library but rather compile the sources files.
@ -36,7 +36,7 @@ ENDIF(WIN32)
# Headers file are located here: # Headers file are located here:
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${OPENJPEG_SOURCE_DIR}/libopenjpeg ${OPENJPEG_SOURCE_DIR}/libopenjpeg
${OPENJPEG_SOURCE_DIR}/common ${OPENJPEG_SOURCE_DIR}/applications/common
${LCMS_INCLUDE_DIRNAME} ${LCMS_INCLUDE_DIRNAME}
) )
@ -58,7 +58,7 @@ ADD_EXECUTABLE(mj2_to_frames
${common_SRCS} ${common_SRCS}
${OPJ_SRCS} ${OPJ_SRCS}
${MJ2_SRCS} ${MJ2_SRCS}
${OPENJPEG_SOURCE_DIR}/common/color.c ${OPENJPEG_SOURCE_DIR}/applications/common/color.c
) )
IF(LCMS_FOUND OR LCMS2_FOUND) IF(LCMS_FOUND OR LCMS2_FOUND)
TARGET_LINK_LIBRARIES(mj2_to_frames ${LCMS_LIBNAME}) TARGET_LINK_LIBRARIES(mj2_to_frames ${LCMS_LIBNAME})
@ -92,4 +92,4 @@ IF(UNIX)
ENDIF(UNIX) ENDIF(UNIX)
INSTALL(TARGETS frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2 INSTALL(TARGETS frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
DESTINATION bin) DESTINATION ${OPENJPEG_INSTALL_BIN_DIR})

View File

@ -31,8 +31,8 @@
#include <string.h> #include <string.h>
#include "openjpeg.h" #include "openjpeg.h"
#include "../libopenjpeg/j2k.h" #include "j2k.h"
#include "../libopenjpeg/jp2.h" #include "jp2.h"
#include "mj2.h" #include "mj2.h"
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */

View File

@ -30,10 +30,10 @@
#include <string.h> #include <string.h>
#include "openjpeg.h" #include "openjpeg.h"
#include "../libopenjpeg/j2k_lib.h" #include "j2k_lib.h"
#include "../libopenjpeg/j2k.h" #include "j2k.h"
#include "../libopenjpeg/jp2.h" #include "jp2.h"
#include "../libopenjpeg/cio.h" #include "cio.h"
#include "mj2.h" #include "mj2.h"
#include "mj2_convert.h" #include "mj2_convert.h"
#include "getopt.h" #include "getopt.h"

View File

@ -14,7 +14,7 @@ can be bound by the Open JPEG open-source license and disclaimer, expressed else
#include <windows.h> /* for time functions */ #include <windows.h> /* for time functions */
#include "../libopenjpeg/opj_includes.h" #include "opj_includes.h"
#include "mj2.h" #include "mj2.h"
#include <time.h> #include <time.h>

View File

@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "../libopenjpeg/opj_includes.h" #include "opj_includes.h"
#include "mj2.h" #include "mj2.h"
/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */ /** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */

View File

@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "../libopenjpeg/opj_includes.h" #include "opj_includes.h"
#include "mj2.h" #include "mj2.h"
/* ----------------------- */ /* ----------------------- */

View File

@ -31,9 +31,9 @@
#include "opj_config.h" #include "opj_config.h"
#include "openjpeg.h" #include "openjpeg.h"
#include "../libopenjpeg/j2k_lib.h" #include "j2k_lib.h"
#include "../libopenjpeg/j2k.h" #include "j2k.h"
#include "../libopenjpeg/jp2.h" #include "jp2.h"
#include "mj2.h" #include "mj2.h"
#include "mj2_convert.h" #include "mj2_convert.h"

View File

@ -11,7 +11,7 @@ Except for copyright, inclusion of the code within Open JPEG for distribution an
can be bound by the Open JPEG open-source license and disclaimer, expressed elsewhere. can be bound by the Open JPEG open-source license and disclaimer, expressed elsewhere.
*/ */
#include "../libopenjpeg/opj_includes.h" #include "opj_includes.h"
#include "mj2.h" #include "mj2.h"
#include "mj2_to_metadata.h" #include "mj2_to_metadata.h"

View File

@ -31,9 +31,9 @@
#include <string.h> #include <string.h>
#include "openjpeg.h" #include "openjpeg.h"
#include "../libopenjpeg/j2k.h" #include "j2k.h"
#include "../libopenjpeg/jp2.h" #include "jp2.h"
#include "../libopenjpeg/cio.h" #include "cio.h"
#include "mj2.h" #include "mj2.h"
static int int_ceildiv(int a, int b) { static int int_ceildiv(int a, int b) {

View File

@ -1,24 +1,24 @@
INCLUDE_REGULAR_EXPRESSION("^.*$") INCLUDE_REGULAR_EXPRESSION("^.*$")
# Defines the source code for the library # Defines the source code for the library
SET(OPENJPEG_SRCS SET(OPENJPEG_SRCS
bio.c ${CMAKE_CURRENT_SOURCE_DIR}/bio.c
cio.c ${CMAKE_CURRENT_SOURCE_DIR}/cio.c
dwt.c ${CMAKE_CURRENT_SOURCE_DIR}/dwt.c
event.c ${CMAKE_CURRENT_SOURCE_DIR}/event.c
image.c ${CMAKE_CURRENT_SOURCE_DIR}/image.c
j2k.c ${CMAKE_CURRENT_SOURCE_DIR}/j2k.c
j2k_lib.c ${CMAKE_CURRENT_SOURCE_DIR}/j2k_lib.c
jp2.c ${CMAKE_CURRENT_SOURCE_DIR}/jp2.c
jpt.c ${CMAKE_CURRENT_SOURCE_DIR}/jpt.c
mct.c ${CMAKE_CURRENT_SOURCE_DIR}/mct.c
mqc.c ${CMAKE_CURRENT_SOURCE_DIR}/mqc.c
openjpeg.c ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg.c
pi.c ${CMAKE_CURRENT_SOURCE_DIR}/pi.c
raw.c ${CMAKE_CURRENT_SOURCE_DIR}/raw.c
t1.c ${CMAKE_CURRENT_SOURCE_DIR}/t1.c
t2.c ${CMAKE_CURRENT_SOURCE_DIR}/t2.c
tcd.c ${CMAKE_CURRENT_SOURCE_DIR}/tcd.c
tgt.c ${CMAKE_CURRENT_SOURCE_DIR}/tgt.c
) )
# Build the library # Build the library
@ -35,6 +35,11 @@ IF(UNIX)
ENDIF(UNIX) ENDIF(UNIX)
SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES}) SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
# Build the JPWL library ?
IF(BUILD_JPWL)
ADD_SUBDIRECTORY(jpwl)
ENDIF(BUILD_JPWL)
# Install library # Install library
INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME} INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
EXPORT OpenJPEGTargets EXPORT OpenJPEGTargets
@ -43,12 +48,12 @@ INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
# Install includes files # Install includes files
INSTALL(FILES openjpeg.h INSTALL(FILES openjpeg.h
DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${subdir} COMPONENT Headers DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
) )
INSTALL(CODE INSTALL(CODE
"EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${subdir}/openjpeg.h \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_INCLUDE_DIR}/openjpeg.h)") "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${OPENJPEG_INSTALL_SUBDIR}/openjpeg.h \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_INCLUDE_DIR}/openjpeg.h)")
# install man page of the library # install man page of the library
INSTALL( INSTALL(
FILES ../doc/man/man3/libopenjpeg.3 FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjpeg.3
DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3) DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)

View File

@ -2,33 +2,11 @@
ADD_DEFINITIONS(-DUSE_JPWL) ADD_DEFINITIONS(-DUSE_JPWL)
SET(OPJ_SRCS
../libopenjpeg/bio.c
../libopenjpeg/cio.c
../libopenjpeg/dwt.c
../libopenjpeg/event.c
../libopenjpeg/image.c
../libopenjpeg/j2k.c
../libopenjpeg/j2k_lib.c
../libopenjpeg/jp2.c
../libopenjpeg/jpt.c
../libopenjpeg/mct.c
../libopenjpeg/mqc.c
../libopenjpeg/openjpeg.c
../libopenjpeg/pi.c
../libopenjpeg/raw.c
../libopenjpeg/t1.c
../libopenjpeg/t2.c
../libopenjpeg/tcd.c
../libopenjpeg/tgt.c
)
SET(JPWL_SRCS crc.c jpwl.c jpwl_lib.c rs.c) SET(JPWL_SRCS crc.c jpwl.c jpwl_lib.c rs.c)
SET(common_SRCS "") INCLUDE_DIRECTORIES(
# If not getopt was found then add it to the lib: ${OPENJPEG_SOURCE_DIR}/libopenjpeg
IF(DONT_HAVE_GETOPT) )
SET(common_SRCS ${OPENJPEG_SOURCE_DIR}/common/getopt.c)
ENDIF(DONT_HAVE_GETOPT)
# Build the library # Build the library
IF(WIN32) IF(WIN32)
@ -38,7 +16,7 @@ IF(WIN32)
ADD_DEFINITIONS(-DOPJ_STATIC) ADD_DEFINITIONS(-DOPJ_STATIC)
ENDIF(BUILD_SHARED_LIBS) ENDIF(BUILD_SHARED_LIBS)
ENDIF(WIN32) ENDIF(WIN32)
ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME}_JPWL ${JPWL_SRCS} ${OPJ_SRCS}) ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME}_JPWL ${JPWL_SRCS} ${OPENJPEG_SRCS})
SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME}_JPWL SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME}_JPWL
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES}) PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
@ -46,48 +24,3 @@ SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME}_JPWL
INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}_JPWL INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}_JPWL
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
) )
# Build executables
INCLUDE_DIRECTORIES(
${OPENJPEG_SOURCE_DIR}/libopenjpeg
${OPENJPEG_SOURCE_DIR}/common
${ZLIB_INCLUDE_DIRNAME}
${LCMS_INCLUDE_DIRNAME}
${PNG_INCLUDE_DIRNAME}
${TIFF_INCLUDE_DIRNAME}
)
ADD_EXECUTABLE(JPWL_j2k_to_image
../codec/j2k_to_image.c
../codec/convert.c
../codec/index.c
${OPENJPEG_SOURCE_DIR}/common/color.c
${common_SRCS}
)
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image ${OPENJPEG_LIBRARY_NAME}_JPWL
${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
#
IF(UNIX)
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image m)
ENDIF(UNIX)
ADD_EXECUTABLE(JPWL_image_to_j2k
../codec/convert.c
../codec/index.c
../codec/image_to_j2k.c
${common_SRCS}
)
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k ${OPENJPEG_LIBRARY_NAME}_JPWL
${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
#
IF(UNIX)
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k m)
ENDIF(UNIX)
INSTALL(TARGETS JPWL_image_to_j2k JPWL_j2k_to_image
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Binaries
)

View File

@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "../libopenjpeg/opj_includes.h" #include "opj_includes.h"
#ifdef USE_JPWL #ifdef USE_JPWL

View File

@ -31,7 +31,7 @@
#ifdef USE_JPWL #ifdef USE_JPWL
#include "../libopenjpeg/opj_includes.h" #include "opj_includes.h"
#include <limits.h> #include <limits.h>
/** Minimum and maximum values for the double->pfp conversion */ /** Minimum and maximum values for the double->pfp conversion */

View File

@ -129,7 +129,7 @@ static INLINE long lrintf(float f){
/* JPWL>> */ /* JPWL>> */
#ifdef USE_JPWL #ifdef USE_JPWL
#include "../jpwl/jpwl.h" #include "./jpwl/jpwl.h"
#endif /* USE_JPWL */ #endif /* USE_JPWL */
/* <<JPWL */ /* <<JPWL */