added two files FindLCMS.cmake and FindLCMS2.cmake as they are not shipped by default with other cmake modules.
This commit is contained in:
parent
279b67c838
commit
1fd9603c55
3
CHANGES
3
CHANGES
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
March 21, 2011
|
||||||
|
+ [antonin] added two files FindLCMS.cmake and FindLCMS2.cmake as they are not shipped by default with other cmake modules.
|
||||||
|
|
||||||
March 20, 2011
|
March 20, 2011
|
||||||
+ [antonin] added a 'thirdparty' directory to include main source files of libtiff, libpng, libz and liblcms to enable support of these formats in the codec executables. CMake will try to statically build these libraries if they are not found on the system. Note that these third party libraries are not required to build libopenjpeg (which has no dependencies).
|
+ [antonin] added a 'thirdparty' directory to include main source files of libtiff, libpng, libz and liblcms to enable support of these formats in the codec executables. CMake will try to statically build these libraries if they are not found on the system. Note that these third party libraries are not required to build libopenjpeg (which has no dependencies).
|
||||||
- [antonin] removed the 'libs' directory containing win32 compiled versions of libpng, libtiff and liblcms.
|
- [antonin] removed the 'libs' directory containing win32 compiled versions of libpng, libtiff and liblcms.
|
||||||
|
|
|
@ -279,7 +279,7 @@ IF(UNIX OR CYGWIN)
|
||||||
SET(CMAKE_LIBRARY_PATH /usr/lib /usr/local/lib /opt/lib /opt/local/lib)
|
SET(CMAKE_LIBRARY_PATH /usr/lib /usr/local/lib /opt/lib /opt/local/lib)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
#
|
#
|
||||||
FIND_PACKAGE(ZLIB QUIET)
|
FIND_PACKAGE(ZLIB)
|
||||||
#
|
#
|
||||||
IF(ZLIB_LIBRARY STREQUAL "ZLIB_LIBRARY-NOTFOUND")
|
IF(ZLIB_LIBRARY STREQUAL "ZLIB_LIBRARY-NOTFOUND")
|
||||||
SET(ZLIB_FOUND 0)
|
SET(ZLIB_FOUND 0)
|
||||||
|
@ -292,7 +292,7 @@ ENDIF()
|
||||||
SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIR})
|
SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIR})
|
||||||
ENDIF(ZLIB_FOUND)
|
ENDIF(ZLIB_FOUND)
|
||||||
#
|
#
|
||||||
FIND_PACKAGE(PNG QUIET)
|
FIND_PACKAGE(PNG)
|
||||||
#
|
#
|
||||||
IF(PNG_LIBRARY STREQUAL "PNG_LIBRARY-NOTFOUND")
|
IF(PNG_LIBRARY STREQUAL "PNG_LIBRARY-NOTFOUND")
|
||||||
SET(PNG_FOUND 0)
|
SET(PNG_FOUND 0)
|
||||||
|
@ -305,7 +305,7 @@ ENDIF()
|
||||||
SET(PNG_INCLUDE_DIRNAME ${PNG_INCLUDE_DIR})
|
SET(PNG_INCLUDE_DIRNAME ${PNG_INCLUDE_DIR})
|
||||||
ENDIF(PNG_FOUND)
|
ENDIF(PNG_FOUND)
|
||||||
#
|
#
|
||||||
FIND_PACKAGE(TIFF QUIET)
|
FIND_PACKAGE(TIFF)
|
||||||
#
|
#
|
||||||
IF(TIFF_LIBRARY STREQUAL "TIFF_LIBRARY-NOTFOUND")
|
IF(TIFF_LIBRARY STREQUAL "TIFF_LIBRARY-NOTFOUND")
|
||||||
SET(TIFF_FOUND 0)
|
SET(TIFF_FOUND 0)
|
||||||
|
@ -318,36 +318,32 @@ ENDIF()
|
||||||
SET(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR})
|
SET(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR})
|
||||||
ENDIF(TIFF_FOUND)
|
ENDIF(TIFF_FOUND)
|
||||||
#
|
#
|
||||||
FIND_PACKAGE(LCMS QUIET)
|
SET(LCMS12_MISSING 1)
|
||||||
|
INCLUDE(thirdparty/FindLCMS2.cmake OPTIONAL)
|
||||||
#
|
#
|
||||||
IF(LCMS_LIBRARY STREQUAL "LCMS_LIBRARY-NOTFOUND")
|
IF(LCMS2_FOUND)
|
||||||
SET(LCMS_FOUND 0)
|
SET(LCMS12_MISSING 0)
|
||||||
ENDIF(LCMS_LIBRARY STREQUAL "LCMS_LIBRARY-NOTFOUND")
|
SET(HAVE_LCMS2_H 1)
|
||||||
|
SET(HAVE_LCMS2_LIB 1)
|
||||||
|
SET(LCMS_LIBNAME ${LCMS2_LIBRARY})
|
||||||
|
SET(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIR})
|
||||||
|
ENDIF(LCMS2_FOUND)
|
||||||
#
|
#
|
||||||
IF(LCMS_FOUND)
|
IF(NOT LCMS2_FOUND)
|
||||||
SET(HAVE_LCMS1_H 1)
|
INCLUDE(thirdparty/FindLCMS.cmake OPTIONAL)
|
||||||
SET(HAVE_LCMS1_LIB 1)
|
|
||||||
SET(LCMS_LIBNAME ${LCMS_LIBRARIES})
|
|
||||||
SET(LCMS_INCLUDE_DIRNAME ${LCMS_INCLUDE_DIR})
|
|
||||||
ENDIF(LCMS_FOUND)
|
|
||||||
#
|
#
|
||||||
IF(NOT LCMS_FOUND)
|
IF(LCMS_FOUND)
|
||||||
FIND_PACKAGE(LCMS2 QUIET)
|
SET(LCMS12_MISSING 0)
|
||||||
IF(LCMS2_LIBRARY STREQUAL "LCMS2_LIBRARY-NOTFOUND")
|
SET(HAVE_LCMS_H 1)
|
||||||
SET(LCMS2_FOUND 0)
|
SET(HAVE_LCMS_LIB 1)
|
||||||
ENDIF(LCMS2_LIBRARY STREQUAL "LCMS2_LIBRARY-NOTFOUND")
|
SET(LCMS_LIBNAME ${LCMS_LIBRARRY} )
|
||||||
#
|
SET(LCMS_INCLUDE_DIRNAME ${LCMS_INCLUDE_DIR})
|
||||||
IF(LCMS2_FOUND)
|
ENDIF(LCMS_FOUND)
|
||||||
SET(HAVE_LCMS2_H 1)
|
ENDIF(NOT LCMS2_FOUND)
|
||||||
SET(HAVE_LCMS2_LIB 1)
|
|
||||||
SET(LCMS_LIBNAME ${LCMS2_LIBRARIES})
|
|
||||||
SET(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIR})
|
|
||||||
ENDIF(LCMS2_FOUND)
|
|
||||||
ENDIF(NOT LCMS_FOUND)
|
|
||||||
#-------------------------------------------------------------
|
#-------------------------------------------------------------
|
||||||
OPTION(BUILD_THIRDPARTY "Build the thirdparty executables" ON)
|
OPTION(BUILD_THIRDPARTY "Build the thirdparty executables" ON)
|
||||||
#
|
#
|
||||||
IF(NOT ZLIB_FOUND OR NOT PNG_FOUND OR NOT TIFF_FOUND OR (NOT LCMS_FOUND AND NOT LCMS2_FOUND))
|
IF(NOT ZLIB_FOUND OR NOT PNG_FOUND OR NOT TIFF_FOUND OR LCMS12_MISSING)
|
||||||
IF(BUILD_THIRDPARTY)
|
IF(BUILD_THIRDPARTY)
|
||||||
SET(HAVE_ZLIB_H 1)
|
SET(HAVE_ZLIB_H 1)
|
||||||
SET(HAVE_LIBZ 1)
|
SET(HAVE_LIBZ 1)
|
||||||
|
@ -388,7 +384,7 @@ ENDIF()
|
||||||
ENDIF(NOT TIFF_FOUND)
|
ENDIF(NOT TIFF_FOUND)
|
||||||
#
|
#
|
||||||
ENDIF(BUILD_THIRDPARTY)
|
ENDIF(BUILD_THIRDPARTY)
|
||||||
ENDIF(NOT ZLIB_FOUND OR NOT PNG_FOUND OR NOT TIFF_FOUND OR (NOT LCMS_FOUND AND NOT LCMS2_FOUND))
|
ENDIF(NOT ZLIB_FOUND OR NOT PNG_FOUND OR NOT TIFF_FOUND OR LCMS12_MISSING)
|
||||||
#
|
#
|
||||||
ENDIF(BUILD_CODEC OR BUILD_JPWL OR BUILD_MJ2)
|
ENDIF(BUILD_CODEC OR BUILD_JPWL OR BUILD_MJ2)
|
||||||
#
|
#
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
# - Find LCMS library
|
||||||
|
# Find the native LCMS includes and library
|
||||||
|
# This module defines
|
||||||
|
# LCMS_INCLUDE_DIR, where to find tiff.h, etc.
|
||||||
|
# LCMS_LIBRARIES, libraries to link against to use LCMS.
|
||||||
|
# LCMS_FOUND, If false, do not try to use LCMS.
|
||||||
|
# also defined, but not for general use are
|
||||||
|
# LCMS_LIBRARY, where to find the LCMS library.
|
||||||
|
#
|
||||||
|
FIND_PATH(LCMS_INCLUDE_DIR lcms.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
|
||||||
|
#
|
||||||
|
SET(LCMS_NAMES ${LCMS_NAMES} lcms liblcms liblcms_static)
|
||||||
|
FIND_LIBRARY(LCMS_LIBRARY NAMES ${LCMS_NAMES} )
|
||||||
|
#
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set LCMS_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS DEFAULT_MSG LCMS_LIBRARY LCMS_INCLUDE_DIR)
|
||||||
|
#
|
||||||
|
IF(LCMS_FOUND)
|
||||||
|
SET( LCMS_LIBRARIES ${LCMS_LIBRARY} )
|
||||||
|
ENDIF(LCMS_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(LCMS_INCLUDE_DIR LCMS_LIBRARY)
|
|
@ -0,0 +1,23 @@
|
||||||
|
# - Find LCMS2 library
|
||||||
|
# Find the native LCMS2 includes and library
|
||||||
|
# This module defines
|
||||||
|
# LCMS2_INCLUDE_DIR, where to find tiff.h, etc.
|
||||||
|
# LCMS2_LIBRARIES, libraries to link against to use LCMS2.
|
||||||
|
# LCMS2_FOUND, If false, do not try to use LCMS2.
|
||||||
|
# also defined, but not for general use are
|
||||||
|
# LCMS2_LIBRARY, where to find the LCMS2 library.
|
||||||
|
#
|
||||||
|
FIND_PATH(LCMS2_INCLUDE_DIR lcms2.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
|
||||||
|
SET(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static)
|
||||||
|
FIND_LIBRARY(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} )
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
|
||||||
|
#
|
||||||
|
IF(LCMS2_FOUND)
|
||||||
|
SET( LCMS2_LIBRARIES ${LCMS2_LIBRARY} )
|
||||||
|
ENDIF(LCMS2_FOUND)
|
||||||
|
#
|
||||||
|
MARK_AS_ADVANCED(LCMS2_INCLUDE_DIR LCMS2_LIBRARY)
|
Loading…
Reference in New Issue