1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
4 SET(CMAKE_INCLUDE_PATH /usr/include /usr/local/include /opt/include
5 /opt/local/include /usr/include/libpng /usr/include/libpng14
6 /usr/include/libpng12 /usr/local/include/libpng
7 /usr/local/include/libpng14 /usr/local/include/libpng12
8 /opt/include/libpng /opt/include/libpng14 /opt/include/libpng12
9 /opt/local/include/libpng /opt/local/include/libpng14)
10 SET(CMAKE_LIBRARY_PATH /usr/lib /usr/local/lib /opt/lib /opt/local/lib)
19 SET(Z_LIBNAME ${ZLIB_LIBRARIES} PARENT_SCOPE)
20 SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIRS} PARENT_SCOPE)
21 message("Your system seems to have a Z lib available, we will used it to generate PNG lib")
23 ELSE (ZLIB_FOUND) # not found
27 message("We will build Z lib from thirdparty")
28 ADD_SUBDIRECTORY(libz)
29 SET(Z_LIBNAME ${ZLIB_LIBRARIES} PARENT_SCOPE)
30 SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIRS} PARENT_SCOPE)
32 ELSE (BUILD_THIRDPARTY)
33 message("Z lib not found, activate BUILD_THIRDPARTY if you want build it (necessary to build libPNG)")
34 ENDIF(BUILD_THIRDPARTY)
39 # Try to find lib PNG (which depends to zlib)
45 message("Your system seems to have a PNG lib available, we will used it")
46 SET(HAVE_PNG_H 1 PARENT_SCOPE)
47 SET(HAVE_LIBPNG 1 PARENT_SCOPE)
48 SET(PNG_LIBNAME ${PNG_LIBRARIES} PARENT_SCOPE)
49 SET(PNG_INCLUDE_DIRNAME ${PNG_INCLUDE_DIR} PARENT_SCOPE)
51 ELSE(PNG_FOUND) # not found
55 message("We will build PNG lib from thirdparty")
56 ADD_SUBDIRECTORY(libpng)
57 SET(HAVE_PNG_H 1 PARENT_SCOPE)
58 SET(HAVE_LIBPNG 1 PARENT_SCOPE)
59 SET(PNG_LIBNAME ${PNG_LIBRARIES} PARENT_SCOPE)
60 SET(PNG_INCLUDE_DIRNAME ${PNG_INCLUDE_DIR} PARENT_SCOPE)
61 ELSE (BUILD_THIRDPARTY)
62 SET(HAVE_PNG_H 0 PARENT_SCOPE)
63 SET(HAVE_LIBPNG 0 PARENT_SCOPE)
64 message("PNG lib not found, activate BUILD_THIRDPARTY if you want build it")
65 ENDIF(BUILD_THIRDPARTY)
70 message(WARNING "To add lib PNG we need that ZLIB was previously found")
74 # Try to find lib TIFF
79 message("Your system seems to have a TIFF lib available, we will used it")
80 SET(HAVE_TIFF_H 1 PARENT_SCOPE)
81 SET(HAVE_LIBTIFF 1 PARENT_SCOPE)
82 SET(TIFF_LIBNAME ${TIFF_LIBRARIES} PARENT_SCOPE)
83 SET(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} PARENT_SCOPE)
85 ELSE (TIFF_FOUND) # not found
89 message("We will build TIFF lib from thirdparty")
90 ADD_SUBDIRECTORY(libtiff)
91 SET(TIFF_LIBNAME ${TIFF_LIBRARIES} PARENT_SCOPE)
92 SET(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} PARENT_SCOPE)
93 SET(HAVE_TIFF_H 1 PARENT_SCOPE)
94 SET(HAVE_LIBTIFF 1 PARENT_SCOPE)
95 ELSE (BUILD_THIRDPARTY)
96 SET(HAVE_TIFF_H 0 PARENT_SCOPE)
97 SET(HAVE_LIBTIFF 0 PARENT_SCOPE)
98 message("TIFF lib not found, activate BUILD_THIRDPARTY if you want build it")
99 ENDIF(BUILD_THIRDPARTY)
104 # Try to find lib LCMS2 (or by default LCMS)
109 message("Your system seems to have a LCMS2 lib available, we will used it")
110 SET(HAVE_LCMS2_H 1 PARENT_SCOPE)
111 SET(HAVE_LIBLCMS2 1 PARENT_SCOPE)
112 SET(LCMS_LIBNAME ${LCMS2_LIBRARIES} PARENT_SCOPE)
113 SET(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIRS} PARENT_SCOPE)
115 ELSE (LCMS2_FOUND) # not found lcms2
121 message("Your system seems to have a LCMS lib available, we will used it")
122 SET(HAVE_LCMS_H 1 PARENT_SCOPE)
123 SET(HAVE_LIBLCMS 1 PARENT_SCOPE)
124 SET(LCMS_LIBNAME ${LCMS_LIBRARIES} PARENT_SCOPE)
125 SET(LCMS_INCLUDE_DIRNAME ${LCMS_INCLUDE_DIRS} PARENT_SCOPE)
127 ELSE (LCMS_FOUND) # not found lcms
128 SET(HAVE_LCMS_H 0 PARENT_SCOPE)
129 SET(HAVE_LIBLCMS 0 PARENT_SCOPE)
131 IF( BUILD_THIRDPARTY)
134 message("We will build LCMS2 lib from thirdparty")
135 ADD_SUBDIRECTORY(liblcms2)
136 SET(LCMS_LIBNAME "lcms2" PARENT_SCOPE)
137 SET(LCMS_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/liblcms2/include PARENT_SCOPE) #
138 SET(HAVE_LCMS2_H 1 PARENT_SCOPE)
139 SET(HAVE_LIBLCMS2 1 PARENT_SCOPE)
140 ELSE (BUILD_THIRDPARTY)
141 SET(HAVE_LCMS2_H 0 PARENT_SCOPE)
142 SET(HAVE_LIBLCMS2 0 PARENT_SCOPE)
143 message("LCMS2 or LCMS lib not found, activate BUILD_THIRDPARTY if you want build it")
144 ENDIF(BUILD_THIRDPARTY)