7 message(STATUS "We will build Z lib from thirdparty")
9 SET(Z_LIBNAME z PARENT_SCOPE)
10 SET(Z_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/include PARENT_SCOPE)
12 ELSE (BUILD_THIRDPARTY)
16 SET(Z_LIBNAME ${ZLIB_LIBRARIES} PARENT_SCOPE)
17 SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIRS} PARENT_SCOPE)
18 message(STATUS "Your system seems to have a Z lib available, we will use it to generate PNG lib")
19 message(STATUS "DEBUG: ${ZLIB_INCLUDE_DIRS} vs ${ZLIB_INCLUDE_DIR}")
20 ELSE (ZLIB_FOUND) # not found
21 message(STATUS "Z lib not found, activate BUILD_THIRDPARTY if you want build it (necessary to build libPNG)")
23 ENDIF(BUILD_THIRDPARTY)
27 # Try to find lib PNG (which depends on zlib)
30 message(STATUS "We will build PNG lib from thirdparty")
31 ADD_SUBDIRECTORY(libpng)
32 SET(OPJ_HAVE_PNG_H 1 PARENT_SCOPE)
33 SET(OPJ_HAVE_LIBPNG 1 PARENT_SCOPE)
34 SET(PNG_LIBNAME png PARENT_SCOPE)
35 SET(PNG_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/libpng PARENT_SCOPE)
36 ELSE (BUILD_THIRDPARTY)
40 message(STATUS "Your system seems to have a PNG lib available, we will use it")
41 SET(OPJ_HAVE_PNG_H 1 PARENT_SCOPE)
42 SET(OPJ_HAVE_LIBPNG 1 PARENT_SCOPE)
43 SET(PNG_LIBNAME ${PNG_LIBRARIES} PARENT_SCOPE)
44 SET(PNG_INCLUDE_DIRNAME ${PNG_PNG_INCLUDE_DIR} PARENT_SCOPE)
45 ELSE(PNG_FOUND) # not found
46 SET(OPJ_HAVE_PNG_H 0 PARENT_SCOPE)
47 SET(OPJ_HAVE_LIBPNG 0 PARENT_SCOPE)
48 message(STATUS "PNG lib not found, activate BUILD_THIRDPARTY if you want build it")
51 ENDIF(BUILD_THIRDPARTY)
54 # Try to find lib TIFF
58 message(STATUS "We will build TIFF lib from thirdparty")
59 ADD_SUBDIRECTORY(libtiff)
60 SET(TIFF_LIBNAME tiff PARENT_SCOPE)
61 SET(TIFF_INCLUDE_DIRNAME
62 ${OPENJPEG_SOURCE_DIR}/thirdparty/libtiff
63 ${OPENJPEG_BINARY_DIR}/thirdparty/libtiff
65 SET(OPJ_HAVE_TIFF_H 1 PARENT_SCOPE)
66 SET(OPJ_HAVE_LIBTIFF 1 PARENT_SCOPE)
67 ELSE (BUILD_THIRDPARTY)
70 message(STATUS "Your system seems to have a TIFF lib available, we will use it")
71 SET(OPJ_HAVE_TIFF_H 1 PARENT_SCOPE)
72 SET(OPJ_HAVE_LIBTIFF 1 PARENT_SCOPE)
73 SET(TIFF_LIBNAME ${TIFF_LIBRARIES} PARENT_SCOPE)
74 SET(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} PARENT_SCOPE)
75 ELSE (TIFF_FOUND) # not found
76 SET(OPJ_HAVE_TIFF_H 0 PARENT_SCOPE)
77 SET(OPJ_HAVE_LIBTIFF 0 PARENT_SCOPE)
78 message(STATUS "TIFF lib not found, activate BUILD_THIRDPARTY if you want build it")
80 ENDIF(BUILD_THIRDPARTY)
83 # Try to find lib LCMS2 (or by default LCMS)
84 SET(OPJ_HAVE_LCMS_H 0 PARENT_SCOPE)
85 SET(OPJ_HAVE_LIBLCMS 0 PARENT_SCOPE)
89 message(STATUS "We will build LCMS2 lib from thirdparty")
90 ADD_SUBDIRECTORY(liblcms2)
91 SET(LCMS_LIBNAME lcms2 PARENT_SCOPE)
92 SET(LCMS_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/liblcms2/include PARENT_SCOPE) #
93 SET(OPJ_HAVE_LCMS2_H 1 PARENT_SCOPE)
94 SET(OPJ_HAVE_LIBLCMS2 1 PARENT_SCOPE)
95 ELSE (BUILD_THIRDPARTY)
98 message(STATUS "Your system seems to have a LCMS2 lib available, we will use it")
99 SET(OPJ_HAVE_LCMS2_H 1 PARENT_SCOPE)
100 SET(OPJ_HAVE_LIBLCMS2 1 PARENT_SCOPE)
101 SET(LCMS_LIBNAME ${LCMS2_LIBRARIES} PARENT_SCOPE)
102 SET(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIRS} PARENT_SCOPE)
103 ELSE (LCMS2_FOUND) # not found lcms2
107 message(STATUS "Your system seems to have a LCMS lib available, we will use it")
108 SET(OPJ_HAVE_LCMS_H 1 PARENT_SCOPE)
109 SET(OPJ_HAVE_LIBLCMS 1 PARENT_SCOPE)
110 SET(LCMS_LIBNAME ${LCMS_LIBRARIES} PARENT_SCOPE)
111 SET(LCMS_INCLUDE_DIRNAME ${LCMS_INCLUDE_DIRS} PARENT_SCOPE)
112 ELSE (LCMS_FOUND) # not found lcms
113 SET(OPJ_HAVE_LCMS2_H 0 PARENT_SCOPE)
114 SET(OPJ_HAVE_LIBLCMS2 0 PARENT_SCOPE)
115 message(STATUS "LCMS2 or LCMS lib not found, activate BUILD_THIRDPARTY if you want build it")
118 ENDIF(BUILD_THIRDPARTY)