blob: 84f0a2dfc08e72177a12172b9db5913ce3be60a2 [file] [log] [blame]
DRC84697032010-10-15 03:43:24 +00001#
2# Setup
3#
4
DRCd45c5492014-03-11 06:21:46 +00005cmake_minimum_required(VERSION 2.8.8)
DRC9fe22da2014-04-16 23:30:38 +00006# Use LINK_INTERFACE_LIBRARIES instead of INTERFACE_LINK_LIBRARIES
7if(POLICY CMP0022)
8 cmake_policy(SET CMP0022 OLD)
9endif()
DRC84697032010-10-15 03:43:24 +000010
DRC5d6f8582011-02-18 23:08:58 +000011project(libjpeg-turbo C)
DRCf72f1f22014-09-04 18:51:31 +000012set(VERSION 1.4.80)
DRC84697032010-10-15 03:43:24 +000013
DRC9fe22da2014-04-16 23:30:38 +000014if(CYGWIN OR NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
DRC84697032010-10-15 03:43:24 +000015 execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
16 string(REGEX REPLACE "\n" "" BUILD ${BUILD})
17elseif(WIN32)
DRC5e3bb3e2012-10-12 10:19:09 +000018 execute_process(COMMAND "wmic.exe" "os" "get" "LocalDateTime" OUTPUT_VARIABLE
19 BUILD)
20 string(REGEX REPLACE "[^0-9]" "" BUILD "${BUILD}")
21 if (BUILD STREQUAL "")
22 execute_process(COMMAND "cmd.exe" "/C" "DATE" "/T" OUTPUT_VARIABLE BUILD)
23 string(REGEX REPLACE ".*[ ]([0-9]*)[/.]([0-9]*)[/.]([0-9]*).*" "\\3\\2\\1" BUILD "${BUILD}")
24 else()
25 string(SUBSTRING "${BUILD}" 0 8 BUILD)
26 endif()
DRC84697032010-10-15 03:43:24 +000027else()
DRC378da4d2010-10-15 19:11:11 +000028 message(FATAL_ERROR "Platform not supported by this build system. Use autotools instead.")
DRC84697032010-10-15 03:43:24 +000029endif()
30
DRC2ffcb8e2011-04-04 04:56:24 +000031# This does nothing except when using MinGW. CMAKE_BUILD_TYPE has no meaning
32# in Visual Studio, and it always defaults to Debug when using NMake.
DRC84697032010-10-15 03:43:24 +000033if(NOT CMAKE_BUILD_TYPE)
34 set(CMAKE_BUILD_TYPE Release)
35endif()
36
37message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
38
39# This only works if building from the command line. There is currently no way
DRC2ffcb8e2011-04-04 04:56:24 +000040# to set a variable's value based on the build type when using Visual Studio.
DRC84697032010-10-15 03:43:24 +000041if(CMAKE_BUILD_TYPE STREQUAL "Debug")
42 set(BUILD "${BUILD}d")
43endif()
44
DRCeb2b9d62010-10-15 04:55:13 +000045message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
46
DRCddcd5a12011-04-15 00:24:02 +000047option(WITH_SIMD "Include SIMD extensions" TRUE)
48option(WITH_ARITH_ENC "Include arithmetic encoding support" TRUE)
49option(WITH_ARITH_DEC "Include arithmetic decoding support" TRUE)
50option(WITH_JPEG7 "Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
51option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
DRCab706232013-01-18 23:42:31 +000052option(WITH_MEM_SRCDST "Include in-memory source/destination manager functions when emulating the libjpeg v6b or v7 API/ABI" TRUE)
DRCaee4f722014-08-09 23:06:07 +000053option(WITH_TURBOJPEG "Include the TurboJPEG wrapper library and associated test programs" TRUE)
DRC5039d732013-01-21 23:42:12 +000054option(WITH_JAVA "Build Java wrapper for the TurboJPEG library" FALSE)
DRCaee4f722014-08-09 23:06:07 +000055option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_SIMD=0 WITH_TURBOJPEG=0 WITH_ARITH_ENC=0 WITH_ARITH_DEC=0)" FALSE)
DRC665c96e2015-05-15 22:08:21 +000056option(ENABLE_STATIC "Build static libraries" TRUE)
57option(ENABLE_SHARED "Build shared libraries" TRUE)
DRCaee4f722014-08-09 23:06:07 +000058
59if(WITH_12BIT)
60 set(WITH_SIMD FALSE)
61 set(WITH_TURBOJPEG FALSE)
DRCecc58362015-06-27 07:56:29 +000062 set(WITH_JAVA FALSE)
DRCaee4f722014-08-09 23:06:07 +000063 set(WITH_ARITH_ENC FALSE)
64 set(WITH_ARITH_DEC FALSE)
65 set(BITS_IN_JSAMPLE 12)
66 message(STATUS "12-bit JPEG support enabled")
67else()
68 set(BITS_IN_JSAMPLE 8)
69endif()
DRC245cfdf2010-11-23 17:11:06 +000070
71if(WITH_ARITH_ENC)
72 set(C_ARITH_CODING_SUPPORTED 1)
DRC990e28d2011-01-04 21:40:11 +000073 message(STATUS "Arithmetic encoding support enabled")
DRC245cfdf2010-11-23 17:11:06 +000074else()
DRC990e28d2011-01-04 21:40:11 +000075 message(STATUS "Arithmetic encoding support disabled")
DRC245cfdf2010-11-23 17:11:06 +000076endif()
77
78if(WITH_ARITH_DEC)
79 set(D_ARITH_CODING_SUPPORTED 1)
DRC990e28d2011-01-04 21:40:11 +000080 message(STATUS "Arithmetic decoding support enabled")
DRC245cfdf2010-11-23 17:11:06 +000081else()
DRC990e28d2011-01-04 21:40:11 +000082 message(STATUS "Arithmetic decoding support disabled")
DRC245cfdf2010-11-23 17:11:06 +000083endif()
84
DRCaee4f722014-08-09 23:06:07 +000085if(WITH_TURBOJPEG)
86 message(STATUS "TurboJPEG C wrapper enabled")
87else()
88 message(STATUS "TurboJPEG C wrapper disabled")
89endif()
90
DRC957d6232011-04-01 11:13:11 +000091if(WITH_JAVA)
DRC5039d732013-01-21 23:42:12 +000092 message(STATUS "TurboJPEG Java wrapper enabled")
DRC218c0c12011-02-05 06:01:18 +000093else()
DRC5039d732013-01-21 23:42:12 +000094 message(STATUS "TurboJPEG Java wrapper disabled")
DRC218c0c12011-02-05 06:01:18 +000095endif()
96
DRCab706232013-01-18 23:42:31 +000097set(SO_AGE 0)
98if(WITH_MEM_SRCDST)
99 set(SO_AGE 1)
100endif()
101
DRC84697032010-10-15 03:43:24 +0000102set(JPEG_LIB_VERSION 62)
103set(DLL_VERSION ${JPEG_LIB_VERSION})
DRCab706232013-01-18 23:42:31 +0000104set(FULLVERSION ${DLL_VERSION}.${SO_AGE}.0)
DRC84697032010-10-15 03:43:24 +0000105if(WITH_JPEG8)
106 set(JPEG_LIB_VERSION 80)
107 set(DLL_VERSION 8)
DRCa9d5b252010-10-15 06:42:45 +0000108 set(FULLVERSION ${DLL_VERSION}.0.2)
DRCf38eee02011-02-18 07:00:38 +0000109 message(STATUS "Emulating libjpeg v8 API/ABI")
DRC84697032010-10-15 03:43:24 +0000110elseif(WITH_JPEG7)
111 set(JPEG_LIB_VERSION 70)
112 set(DLL_VERSION 7)
DRCab706232013-01-18 23:42:31 +0000113 set(FULLVERSION ${DLL_VERSION}.${SO_AGE}.0)
DRC84697032010-10-15 03:43:24 +0000114 message(STATUS "Emulating libjpeg v7 API/ABI")
115endif(WITH_JPEG8)
116
DRCab706232013-01-18 23:42:31 +0000117if(WITH_MEM_SRCDST)
118 set(MEM_SRCDST_SUPPORTED 1)
119 message(STATUS "In-memory source/destination managers enabled")
120else()
121 message(STATUS "In-memory source/destination managers disabled")
122endif()
123
DRC84697032010-10-15 03:43:24 +0000124if(MSVC)
DRC89a3f972015-03-19 19:27:40 +0000125 option(WITH_CRT_DLL
126 "Link all libjpeg-turbo libraries and executables with the C run-time DLL (msvcr*.dll) instead of the static C run-time library (libcmt*.lib.) The default is to use the C run-time DLL only with the libraries and executables that need it."
127 FALSE)
128 if(NOT WITH_CRT_DLL)
129 # Use the static C library for all build types
130 foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
131 CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
132 if(${var} MATCHES "/MD")
133 string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
134 endif()
135 endforeach()
136 endif()
DRC84697032010-10-15 03:43:24 +0000137 add_definitions(-W3 -wd4996)
138endif()
139
140# Detect whether compiler is 64-bit
141if(MSVC AND CMAKE_CL_64)
142 set(SIMD_X86_64 1)
143 set(64BIT 1)
144elseif(CMAKE_SIZEOF_VOID_P MATCHES 8)
145 set(SIMD_X86_64 1)
146 set(64BIT 1)
147endif()
148
149if(64BIT)
150 message(STATUS "64-bit build")
151else()
152 message(STATUS "32-bit build")
153endif()
154
DRC7175e512013-04-23 22:29:00 +0000155if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
156 if(MSVC)
157 set(CMAKE_INSTALL_PREFIX_DEFAULT ${CMAKE_PROJECT_NAME})
158 else()
159 set(CMAKE_INSTALL_PREFIX_DEFAULT ${CMAKE_PROJECT_NAME}-gcc)
160 endif()
161 if(64BIT)
162 set(CMAKE_INSTALL_PREFIX_DEFAULT ${CMAKE_INSTALL_PREFIX_DEFAULT}64)
163 endif()
164 set(CMAKE_INSTALL_PREFIX "c:/${CMAKE_INSTALL_PREFIX_DEFAULT}" CACHE PATH
165 "Directory into which to install libjpeg-turbo (default: c:/${CMAKE_INSTALL_PREFIX_DEFAULT})"
166 FORCE)
167endif()
168
169message(STATUS "Install directory = ${CMAKE_INSTALL_PREFIX}")
170
DRC84697032010-10-15 03:43:24 +0000171configure_file(win/jconfig.h.in jconfig.h)
DRCff6961f2014-04-20 09:17:11 +0000172configure_file(win/jconfigint.h.in jconfigint.h)
DRC84697032010-10-15 03:43:24 +0000173
174include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
175
DRC957d6232011-04-01 11:13:11 +0000176if(WITH_JAVA)
177 find_package(Java)
178 find_package(JNI)
DRCdb425062011-04-03 06:10:18 +0000179 if(DEFINED JAVACFLAGS)
180 message(STATUS "Java compiler flags = ${JAVACFLAGS}")
181 endif()
DRC218c0c12011-02-05 06:01:18 +0000182endif()
183
DRC84697032010-10-15 03:43:24 +0000184
185#
186# Targets
187#
188
DRC245cfdf2010-11-23 17:11:06 +0000189set(JPEG_SOURCES jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c
190 jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c jcphuff.c
191 jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c jdatasrc.c
192 jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c
193 jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c
194 jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c
195 jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c)
196
197if(WITH_ARITH_ENC OR WITH_ARITH_DEC)
198 set(JPEG_SOURCES ${JPEG_SOURCES} jaricom.c)
199endif()
200
201if(WITH_ARITH_ENC)
202 set(JPEG_SOURCES ${JPEG_SOURCES} jcarith.c)
203endif()
204
205if(WITH_ARITH_DEC)
206 set(JPEG_SOURCES ${JPEG_SOURCES} jdarith.c)
207endif()
DRC84697032010-10-15 03:43:24 +0000208
209if(WITH_SIMD)
210 add_definitions(-DWITH_SIMD)
211 add_subdirectory(simd)
212 if(SIMD_X86_64)
213 set(JPEG_SOURCES ${JPEG_SOURCES} simd/jsimd_x86_64.c)
214 else()
215 set(JPEG_SOURCES ${JPEG_SOURCES} simd/jsimd_i386.c)
216 endif()
217 # This tells CMake that the "source" files haven't been generated yet
218 set_source_files_properties(${SIMD_OBJS} PROPERTIES GENERATED 1)
219else()
220 set(JPEG_SOURCES ${JPEG_SOURCES} jsimd_none.c)
DRC6f4ba612010-10-16 21:27:38 +0000221 message(STATUS "Not using SIMD acceleration")
DRC84697032010-10-15 03:43:24 +0000222endif()
223
DRC957d6232011-04-01 11:13:11 +0000224if(WITH_JAVA)
225 add_subdirectory(java)
DRC665c96e2015-05-15 22:08:21 +0000226 set(ENABLE_SHARED TRUE)
DRC957d6232011-04-01 11:13:11 +0000227endif()
228
DRC665c96e2015-05-15 22:08:21 +0000229if(ENABLE_SHARED)
230 add_subdirectory(sharedlib)
DRC84697032010-10-15 03:43:24 +0000231endif()
DRC665c96e2015-05-15 22:08:21 +0000232
233if(ENABLE_STATIC OR WITH_TURBOJPEG)
234 add_library(jpeg-static STATIC ${JPEG_SOURCES} ${SIMD_OBJS})
235 if(NOT MSVC)
236 set_target_properties(jpeg-static PROPERTIES OUTPUT_NAME jpeg)
237 endif()
238 if(WITH_SIMD)
239 add_dependencies(jpeg-static simd)
240 endif()
DRC84697032010-10-15 03:43:24 +0000241endif()
242
DRCaee4f722014-08-09 23:06:07 +0000243if(WITH_TURBOJPEG)
244 set(TURBOJPEG_SOURCES turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c)
245 if(WITH_JAVA)
246 set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES} turbojpeg-jni.c)
247 include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
248 endif()
249
DRC665c96e2015-05-15 22:08:21 +0000250 if(ENABLE_SHARED)
251 add_library(turbojpeg SHARED ${TURBOJPEG_SOURCES})
252 set_target_properties(turbojpeg PROPERTIES DEFINE_SYMBOL DLLDEFINE)
253 if(MINGW)
254 set_target_properties(turbojpeg PROPERTIES LINK_FLAGS -Wl,--kill-at)
255 endif()
256 target_link_libraries(turbojpeg jpeg-static)
257 set_target_properties(turbojpeg PROPERTIES LINK_INTERFACE_LIBRARIES "")
DRCaee4f722014-08-09 23:06:07 +0000258
DRC665c96e2015-05-15 22:08:21 +0000259 add_executable(tjunittest tjunittest.c tjutil.c)
260 target_link_libraries(tjunittest turbojpeg)
261
262 add_executable(tjbench tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c wrbmp.c
263 wrppm.c)
264 target_link_libraries(tjbench turbojpeg jpeg-static)
265 set_property(TARGET tjbench PROPERTY COMPILE_FLAGS
266 "-DBMP_SUPPORTED -DPPM_SUPPORTED")
DRCaee4f722014-08-09 23:06:07 +0000267 endif()
268
DRC665c96e2015-05-15 22:08:21 +0000269 if(ENABLE_STATIC)
270 add_library(turbojpeg-static STATIC ${JPEG_SOURCES} ${SIMD_OBJS}
271 turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c)
272 if(NOT MSVC)
273 set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg)
274 endif()
275 if(WITH_SIMD)
276 add_dependencies(turbojpeg-static simd)
277 endif()
DRCaee4f722014-08-09 23:06:07 +0000278
DRC665c96e2015-05-15 22:08:21 +0000279 add_executable(tjunittest-static tjunittest.c tjutil.c)
280 target_link_libraries(tjunittest-static turbojpeg-static)
DRCaee4f722014-08-09 23:06:07 +0000281
DRC665c96e2015-05-15 22:08:21 +0000282 add_executable(tjbench-static tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c
283 wrbmp.c wrppm.c)
284 target_link_libraries(tjbench-static turbojpeg-static jpeg-static)
285 set_property(TARGET tjbench-static PROPERTY COMPILE_FLAGS
286 "-DBMP_SUPPORTED -DPPM_SUPPORTED")
287 endif()
DRC218c0c12011-02-05 06:01:18 +0000288endif()
289
DRCaee4f722014-08-09 23:06:07 +0000290if(WITH_12BIT)
291 set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED -DUSE_SETMODE")
292else()
293 set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
DRCecc58362015-06-27 07:56:29 +0000294 set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
295 set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
DRC84697032010-10-15 03:43:24 +0000296endif()
297
DRC665c96e2015-05-15 22:08:21 +0000298if(ENABLE_STATIC)
299 add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c
300 ${CJPEG_BMP_SOURCES})
301 set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
302 target_link_libraries(cjpeg-static jpeg-static)
DRC84697032010-10-15 03:43:24 +0000303
DRC665c96e2015-05-15 22:08:21 +0000304 add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrgif.c
305 wrppm.c ${DJPEG_BMP_SOURCES})
306 set_property(TARGET djpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
307 target_link_libraries(djpeg-static jpeg-static)
DRC84697032010-10-15 03:43:24 +0000308
DRC665c96e2015-05-15 22:08:21 +0000309 add_executable(jpegtran-static jpegtran.c cdjpeg.c rdswitch.c transupp.c)
310 target_link_libraries(jpegtran-static jpeg-static)
311 set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "-DUSE_SETMODE")
312endif()
DRC84697032010-10-15 03:43:24 +0000313
314add_executable(rdjpgcom rdjpgcom.c)
315
DRCa81f5422014-06-22 20:50:14 +0000316add_executable(wrjpgcom wrjpgcom.c)
DRC84697032010-10-15 03:43:24 +0000317
318
319#
320# Tests
321#
322
DRCf9134382016-02-06 14:09:20 -0600323add_subdirectory(md5)
324
DRC957d6232011-04-01 11:13:11 +0000325if(MSVC_IDE)
326 set(OBJDIR "\${CTEST_CONFIGURATION_TYPE}/")
327else()
328 set(OBJDIR "")
329endif()
330
DRC84697032010-10-15 03:43:24 +0000331enable_testing()
DRC211d1e72013-01-13 11:25:20 +0000332
DRCaee4f722014-08-09 23:06:07 +0000333if(WITH_12BIT)
334 set(TESTORIG testorig12.jpg)
335 set(MD5_JPEG_RGB_ISLOW 9620f424569594bb9242b48498ad801f)
336 set(MD5_PPM_RGB_ISLOW f3301d2219783b8b3d942b7239fa50c0)
337 set(MD5_JPEG_422_IFAST_OPT 7322e3bd2f127f7de4b40d4480ce60e4)
338 set(MD5_PPM_422_IFAST 79807fa552899e66a04708f533e16950)
339 set(MD5_PPM_422M_IFAST 07737bfe8a7c1c87aaa393a0098d16b0)
340 set(MD5_JPEG_420_IFAST_Q100_PROG a1da220b5604081863a504297ed59e55)
341 set(MD5_PPM_420_Q100_IFAST 1b3730122709f53d007255e8dfd3305e)
342 set(MD5_PPM_420M_Q100_IFAST 980a1a3c5bf9510022869d30b7d26566)
343 set(MD5_JPEG_GRAY_ISLOW 235c90707b16e2e069f37c888b2636d9)
344 set(MD5_PPM_GRAY_ISLOW 7213c10af507ad467da5578ca5ee1fca)
345 set(MD5_PPM_GRAY_ISLOW_RGB e96ee81c30a6ed422d466338bd3de65d)
346 set(MD5_JPEG_420S_IFAST_OPT 7af8e60be4d9c227ec63ac9b6630855e)
347 set(MD5_JPEG_3x2_FLOAT_PROG a8c17daf77b457725ec929e215b603f8)
348 set(MD5_PPM_3x2_FLOAT 42876ab9e5c2f76a87d08db5fbd57956)
349 set(MD5_PPM_420M_ISLOW_2_1 4ca6be2a6f326ff9eaab63e70a8259c0)
350 set(MD5_PPM_420M_ISLOW_15_8 12aa9f9534c1b3d7ba047322226365eb)
351 set(MD5_PPM_420M_ISLOW_13_8 f7e22817c7b25e1393e4ec101e9d4e96)
352 set(MD5_PPM_420M_ISLOW_11_8 800a16f9f4dc9b293197bfe11be10a82)
353 set(MD5_PPM_420M_ISLOW_9_8 06b7a92a9bc69f4dc36ec40f1937d55c)
354 set(MD5_PPM_420M_ISLOW_7_8 3ec444a14a4ab4eab88ffc49c48eca43)
355 set(MD5_PPM_420M_ISLOW_3_4 3e726b7ea872445b19437d1c1d4f0d93)
356 set(MD5_PPM_420M_ISLOW_5_8 a8a771abdc94301d20ffac119b2caccd)
357 set(MD5_PPM_420M_ISLOW_1_2 b419124dd5568b085787234866102866)
358 set(MD5_PPM_420M_ISLOW_3_8 343d19015531b7bbe746124127244fa8)
359 set(MD5_PPM_420M_ISLOW_1_4 35fd59d866e44659edfa3c18db2a3edb)
360 set(MD5_PPM_420M_ISLOW_1_8 ccaed48ac0aedefda5d4abe4013f4ad7)
DRC7a7da942015-06-27 08:10:31 +0000361 set(MD5_PPM_420_ISLOW_SKIP15_31 86664cd9dc956536409e44e244d20a97)
362 set(MD5_PPM_420_ISLOW_PROG_STRIP71_132 a5c3706bb2e59bd01786b1181f67f97c)
363 set(MD5_PPM_444_ISLOW_SKIP1_6 ef63901f71ef7a75cd78253fc0914f84)
364 set(MD5_PPM_444_ISLOW_PROG_STRIP13_110 6d228f8d05381d8639f3d078b91b2ee0)
DRCaee4f722014-08-09 23:06:07 +0000365 set(MD5_JPEG_CROP cdb35ff4b4519392690ea040c56ea99c)
DRC35db75e2014-05-06 22:44:46 +0000366else()
DRCaee4f722014-08-09 23:06:07 +0000367 set(TESTORIG testorig.jpg)
368 set(MD5_JPEG_RGB_ISLOW 768e970dd57b340ff1b83c9d3d47c77b)
369 set(MD5_PPM_RGB_ISLOW 00a257f5393fef8821f2b88ac7421291)
370 set(MD5_BMP_RGB_ISLOW_565 f07d2e75073e4bb10f6c6f4d36e2e3be)
371 set(MD5_BMP_RGB_ISLOW_565D 4cfa0928ef3e6bb626d7728c924cfda4)
372 set(MD5_JPEG_422_IFAST_OPT 2540287b79d913f91665e660303ab2c8)
373 set(MD5_PPM_422_IFAST 35bd6b3f833bad23de82acea847129fa)
374 set(MD5_PPM_422M_IFAST 8dbc65323d62cca7c91ba02dd1cfa81d)
375 set(MD5_BMP_422M_IFAST_565 3294bd4d9a1f2b3d08ea6020d0db7065)
376 set(MD5_BMP_422M_IFAST_565D da98c9c7b6039511be4a79a878a9abc1)
377 set(MD5_JPEG_420_IFAST_Q100_PROG 990cbe0329c882420a2094da7e5adade)
378 set(MD5_PPM_420_Q100_IFAST 5a732542015c278ff43635e473a8a294)
379 set(MD5_PPM_420M_Q100_IFAST ff692ee9323a3b424894862557c092f1)
380 set(MD5_JPEG_GRAY_ISLOW 72b51f894b8f4a10b3ee3066770aa38d)
381 set(MD5_PPM_GRAY_ISLOW 8d3596c56eace32f205deccc229aa5ed)
382 set(MD5_PPM_GRAY_ISLOW_RGB 116424ac07b79e5e801f00508eab48ec)
383 set(MD5_BMP_GRAY_ISLOW_565 12f78118e56a2f48b966f792fedf23cc)
384 set(MD5_BMP_GRAY_ISLOW_565D bdbbd616441a24354c98553df5dc82db)
385 set(MD5_JPEG_420S_IFAST_OPT 388708217ac46273ca33086b22827ed8)
386 if(WITH_SIMD)
387 set(MD5_JPEG_3x2_FLOAT_PROG 343e3f8caf8af5986ebaf0bdc13b5c71)
388 set(MD5_PPM_3x2_FLOAT 1a75f36e5904d6fc3a85a43da9ad89bb)
389 else()
390 set(MD5_JPEG_3x2_FLOAT_PROG 9bca803d2042bd1eb03819e2bf92b3e5)
391 set(MD5_PPM_3x2_FLOAT f6bfab038438ed8f5522fbd33595dcdc)
392 endif()
393 set(MD5_JPEG_420_ISLOW_ARI e986fb0a637a8d833d96e8a6d6d84ea1)
394 set(MD5_JPEG_444_ISLOW_PROGARI 0a8f1c8f66e113c3cf635df0a475a617)
395 set(MD5_PPM_420M_IFAST_ARI 72b59a99bcf1de24c5b27d151bde2437)
396 set(MD5_JPEG_420_ISLOW 9a68f56bc76e466aa7e52f415d0f4a5f)
397 set(MD5_PPM_420M_ISLOW_2_1 9f9de8c0612f8d06869b960b05abf9c9)
398 set(MD5_PPM_420M_ISLOW_15_8 b6875bc070720b899566cc06459b63b7)
399 set(MD5_PPM_420M_ISLOW_13_8 bc3452573c8152f6ae552939ee19f82f)
400 set(MD5_PPM_420M_ISLOW_11_8 d8cc73c0aaacd4556569b59437ba00a5)
401 set(MD5_PPM_420M_ISLOW_9_8 d25e61bc7eac0002f5b393aa223747b6)
402 set(MD5_PPM_420M_ISLOW_7_8 ddb564b7c74a09494016d6cd7502a946)
403 set(MD5_PPM_420M_ISLOW_3_4 8ed8e68808c3fbc4ea764fc9d2968646)
404 set(MD5_PPM_420M_ISLOW_5_8 a3363274999da2366a024efae6d16c9b)
405 set(MD5_PPM_420M_ISLOW_1_2 e692a315cea26b988c8e8b29a5dbcd81)
406 set(MD5_PPM_420M_ISLOW_3_8 79eca9175652ced755155c90e785a996)
407 set(MD5_PPM_420M_ISLOW_1_4 79cd778f8bf1a117690052cacdd54eca)
408 set(MD5_PPM_420M_ISLOW_1_8 391b3d4aca640c8567d6f8745eb2142f)
409 set(MD5_BMP_420_ISLOW_256 4980185e3776e89bd931736e1cddeee6)
410 set(MD5_BMP_420_ISLOW_565 bf9d13e16c4923b92e1faa604d7922cb)
411 set(MD5_BMP_420_ISLOW_565D 6bde71526acc44bcff76f696df8638d2)
412 set(MD5_BMP_420M_ISLOW_565 8dc0185245353cfa32ad97027342216f)
413 set(MD5_BMP_420M_ISLOW_565D d1be3a3339166255e76fa50a0d70d73e)
DRC7a7da942015-06-27 08:10:31 +0000414 set(MD5_PPM_420_ISLOW_SKIP15_31 c4c65c1e43d7275cd50328a61e6534f0)
415 set(MD5_PPM_420_ISLOW_ARI_SKIP16_139 087c6b123db16ac00cb88c5b590bb74a)
416 set(MD5_PPM_420_ISLOW_PROG_STRIP71_132 a7f2ba6ea335f03549888bed66a89fae)
417 set(MD5_PPM_420_ISLOW_ARI_STRIP4_56 0e5e44a39b94817917a1bac72903246b)
418 set(MD5_PPM_444_ISLOW_SKIP1_6 5606f86874cf26b8fcee1117a0a436a6)
419 set(MD5_PPM_444_ISLOW_PROG_STRIP13_110 40b5d9742558dca6229d7332fc2dda07)
420 set(MD5_PPM_444_ISLOW_ARI_STRIP0_36 9aceb5b9449c900b892a1d2fe39351b4)
DRCaee4f722014-08-09 23:06:07 +0000421 set(MD5_JPEG_CROP b4197f377e621c4e9b1d20471432610d)
DRC35db75e2014-05-06 22:44:46 +0000422endif()
DRC211d1e72013-01-13 11:25:20 +0000423
DRC957d6232011-04-01 11:13:11 +0000424if(WITH_JAVA)
DRC35db75e2014-05-06 22:44:46 +0000425 add_test(TJUnitTest
426 ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
427 -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
428 TJUnitTest)
429 add_test(TJUnitTest-yuv
430 ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
431 -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
432 TJUnitTest -yuv)
433 add_test(TJUnitTest-yuv-nopad
434 ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
435 -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
436 TJUnitTest -yuv -noyuvpad)
437 add_test(TJUnitTest-bi
438 ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
439 -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
440 TJUnitTest -bi)
441 add_test(TJUnitTest-bi-yuv
442 ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
443 -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
444 TJUnitTest -bi -yuv)
445 add_test(TJUnitTest-bi-yuv-nopad
446 ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
447 -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
448 TJUnitTest -bi -yuv -noyuvpad)
DRC957d6232011-04-01 11:13:11 +0000449endif()
DRC84697032010-10-15 03:43:24 +0000450
DRC665c96e2015-05-15 22:08:21 +0000451set(TEST_LIBTYPES "")
452if(ENABLE_SHARED)
453 set(TEST_LIBTYPES ${TEST_LIBTYPES} shared)
454endif()
455if(ENABLE_STATIC)
456 set(TEST_LIBTYPES ${TEST_LIBTYPES} static)
457endif()
458
DRCf9134382016-02-06 14:09:20 -0600459set(TESTIMAGES ${CMAKE_SOURCE_DIR}/testimages)
460set(MD5CMP ${CMAKE_CURRENT_BINARY_DIR}/md5/md5cmp)
461if(CMAKE_CROSSCOMPILING)
462 file(RELATIVE_PATH TESTIMAGES ${CMAKE_CURRENT_BINARY_DIR} ${TESTIMAGES})
463 file(RELATIVE_PATH MD5CMP ${CMAKE_CURRENT_BINARY_DIR} ${MD5CMP})
464endif()
465
DRC665c96e2015-05-15 22:08:21 +0000466foreach(libtype ${TEST_LIBTYPES})
DRC35db75e2014-05-06 22:44:46 +0000467 if(libtype STREQUAL "shared")
468 set(dir sharedlib/)
469 else()
470 set(dir "")
471 set(suffix -static)
472 endif()
DRCaee4f722014-08-09 23:06:07 +0000473 if(WITH_TURBOJPEG)
474 add_test(tjunittest${suffix} tjunittest${suffix})
475 add_test(tjunittest${suffix}-alloc tjunittest${suffix} -alloc)
476 add_test(tjunittest${suffix}-yuv tjunittest${suffix} -yuv)
477 add_test(tjunittest${suffix}-yuv-alloc tjunittest${suffix} -yuv -alloc)
478 add_test(tjunittest${suffix}-yuv-nopad tjunittest${suffix} -yuv -noyuvpad)
479 endif()
DRC35db75e2014-05-06 22:44:46 +0000480
481 # These tests are carefully chosen to provide full coverage of as many of the
482 # underlying algorithms as possible (including all of the SIMD-accelerated
483 # ones.)
484
485 # CC: null SAMP: fullsize FDCT: islow ENT: huff
486 add_test(cjpeg${suffix}-rgb-islow
DRCf9134382016-02-06 14:09:20 -0600487 ${dir}cjpeg${suffix} -rgb -dct int
488 -outfile testout_rgb_islow.jpg ${TESTIMAGES}/testorig.ppm)
DRC35db75e2014-05-06 22:44:46 +0000489 add_test(cjpeg${suffix}-rgb-islow-cmp
DRCf9134382016-02-06 14:09:20 -0600490 ${MD5CMP} ${MD5_JPEG_RGB_ISLOW} testout_rgb_islow.jpg)
491
DRC35db75e2014-05-06 22:44:46 +0000492 # CC: null SAMP: fullsize IDCT: islow ENT: huff
493 add_test(djpeg${suffix}-rgb-islow
DRCf9134382016-02-06 14:09:20 -0600494 ${dir}djpeg${suffix} -dct int -ppm
495 -outfile testout_rgb_islow.ppm testout_rgb_islow.jpg)
DRC35db75e2014-05-06 22:44:46 +0000496 add_test(djpeg${suffix}-rgb-islow-cmp
DRCf9134382016-02-06 14:09:20 -0600497 ${MD5CMP} ${MD5_PPM_RGB_ISLOW} testout_rgb_islow.ppm)
498
DRCaee4f722014-08-09 23:06:07 +0000499 if(NOT WITH_12BIT)
500 # CC: RGB->RGB565 SAMP: fullsize IDCT: islow ENT: huff
501 add_test(djpeg${suffix}-rgb-islow-565
502 ${dir}djpeg${suffix} -dct int -rgb565 -dither none -bmp
503 -outfile testout_rgb_islow_565.bmp testout_rgb_islow.jpg)
504 add_test(djpeg${suffix}-rgb-islow-565-cmp
DRCf9134382016-02-06 14:09:20 -0600505 ${MD5CMP} ${MD5_BMP_RGB_ISLOW_565} testout_rgb_islow_565.bmp)
506
DRCaee4f722014-08-09 23:06:07 +0000507 # CC: RGB->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
508 add_test(djpeg${suffix}-rgb-islow-565D
509 ${dir}djpeg${suffix} -dct int -rgb565 -bmp
510 -outfile testout_rgb_islow_565D.bmp testout_rgb_islow.jpg)
511 add_test(djpeg${suffix}-rgb-islow-565D-cmp
DRCf9134382016-02-06 14:09:20 -0600512 ${MD5CMP} ${MD5_BMP_RGB_ISLOW_565D} testout_rgb_islow_565D.bmp)
DRCaee4f722014-08-09 23:06:07 +0000513 endif()
DRC35db75e2014-05-06 22:44:46 +0000514
515 # CC: RGB->YCC SAMP: fullsize/h2v1 FDCT: ifast ENT: 2-pass huff
516 add_test(cjpeg${suffix}-422-ifast-opt
517 ${dir}cjpeg${suffix} -sample 2x1 -dct fast -opt
DRCf9134382016-02-06 14:09:20 -0600518 -outfile testout_422_ifast_opt.jpg ${TESTIMAGES}/testorig.ppm)
DRC35db75e2014-05-06 22:44:46 +0000519 add_test(cjpeg${suffix}-422-ifast-opt-cmp
DRCf9134382016-02-06 14:09:20 -0600520 ${MD5CMP} ${MD5_JPEG_422_IFAST_OPT} testout_422_ifast_opt.jpg)
521
DRC35db75e2014-05-06 22:44:46 +0000522 # CC: YCC->RGB SAMP: fullsize/h2v1 fancy IDCT: ifast ENT: huff
523 add_test(djpeg${suffix}-422-ifast
DRCf9134382016-02-06 14:09:20 -0600524 ${dir}djpeg${suffix} -dct fast
525 -outfile testout_422_ifast.ppm testout_422_ifast_opt.jpg)
DRC35db75e2014-05-06 22:44:46 +0000526 add_test(djpeg${suffix}-422-ifast-cmp
DRCf9134382016-02-06 14:09:20 -0600527 ${MD5CMP} ${MD5_PPM_422_IFAST} testout_422_ifast.ppm)
528
DRC35db75e2014-05-06 22:44:46 +0000529 # CC: YCC->RGB SAMP: h2v1 merged IDCT: ifast ENT: huff
530 add_test(djpeg${suffix}-422m-ifast
DRCf9134382016-02-06 14:09:20 -0600531 ${dir}djpeg${suffix} -dct fast -nosmooth
532 -outfile testout_422m_ifast.ppm testout_422_ifast_opt.jpg)
DRC35db75e2014-05-06 22:44:46 +0000533 add_test(djpeg${suffix}-422m-ifast-cmp
DRCf9134382016-02-06 14:09:20 -0600534 ${MD5CMP} ${MD5_PPM_422M_IFAST} testout_422m_ifast.ppm)
535
DRCaee4f722014-08-09 23:06:07 +0000536 if(NOT WITH_12BIT)
537 # CC: YCC->RGB565 SAMP: h2v1 merged IDCT: ifast ENT: huff
538 add_test(djpeg${suffix}-422m-ifast-565
539 ${dir}djpeg${suffix} -dct int -nosmooth -rgb565 -dither none -bmp
540 -outfile testout_422m_ifast_565.bmp testout_422_ifast_opt.jpg)
541 add_test(djpeg${suffix}-422m-ifast-565-cmp
DRCf9134382016-02-06 14:09:20 -0600542 ${MD5CMP} ${MD5_BMP_422M_IFAST_565} testout_422m_ifast_565.bmp)
543
DRCaee4f722014-08-09 23:06:07 +0000544 # CC: YCC->RGB565 (dithered) SAMP: h2v1 merged IDCT: ifast ENT: huff
545 add_test(djpeg${suffix}-422m-ifast-565D
546 ${dir}djpeg${suffix} -dct int -nosmooth -rgb565 -bmp
547 -outfile testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg)
548 add_test(djpeg${suffix}-422m-ifast-565D-cmp
DRCf9134382016-02-06 14:09:20 -0600549 ${MD5CMP} ${MD5_BMP_422M_IFAST_565D} testout_422m_ifast_565D.bmp)
DRCaee4f722014-08-09 23:06:07 +0000550 endif()
DRC35db75e2014-05-06 22:44:46 +0000551
552 # CC: RGB->YCC SAMP: fullsize/h2v2 FDCT: ifast ENT: prog huff
553 add_test(cjpeg${suffix}-420-q100-ifast-prog
DRC78df2e62014-05-12 09:23:57 +0000554 ${dir}cjpeg${suffix} -sample 2x2 -quality 100 -dct fast -prog
DRCf9134382016-02-06 14:09:20 -0600555 -outfile testout_420_q100_ifast_prog.jpg ${TESTIMAGES}/testorig.ppm)
DRC35db75e2014-05-06 22:44:46 +0000556 add_test(cjpeg${suffix}-420-q100-ifast-prog-cmp
DRCf9134382016-02-06 14:09:20 -0600557 ${MD5CMP} ${MD5_JPEG_420_IFAST_Q100_PROG} testout_420_q100_ifast_prog.jpg)
558
DRC35db75e2014-05-06 22:44:46 +0000559 # CC: YCC->RGB SAMP: fullsize/h2v2 fancy IDCT: ifast ENT: prog huff
560 add_test(djpeg${suffix}-420-q100-ifast-prog
DRCf9134382016-02-06 14:09:20 -0600561 ${dir}djpeg${suffix} -dct fast
562 -outfile testout_420_q100_ifast.ppm testout_420_q100_ifast_prog.jpg)
DRC35db75e2014-05-06 22:44:46 +0000563 add_test(djpeg${suffix}-420-q100-ifast-prog-cmp
DRCf9134382016-02-06 14:09:20 -0600564 ${MD5CMP} ${MD5_PPM_420_Q100_IFAST} testout_420_q100_ifast.ppm)
565
DRC35db75e2014-05-06 22:44:46 +0000566 # CC: YCC->RGB SAMP: h2v2 merged IDCT: ifast ENT: prog huff
567 add_test(djpeg${suffix}-420m-q100-ifast-prog
DRC78df2e62014-05-12 09:23:57 +0000568 ${dir}djpeg${suffix} -dct fast -nosmooth
DRC35db75e2014-05-06 22:44:46 +0000569 -outfile testout_420m_q100_ifast.ppm testout_420_q100_ifast_prog.jpg)
570 add_test(djpeg${suffix}-420m-q100-ifast-prog-cmp
DRCf9134382016-02-06 14:09:20 -0600571 ${MD5CMP} ${MD5_PPM_420M_Q100_IFAST} testout_420m_q100_ifast.ppm)
DRC35db75e2014-05-06 22:44:46 +0000572
573 # CC: RGB->Gray SAMP: fullsize FDCT: islow ENT: huff
574 add_test(cjpeg${suffix}-gray-islow
DRCf9134382016-02-06 14:09:20 -0600575 ${dir}cjpeg${suffix} -gray -dct int
576 -outfile testout_gray_islow.jpg ${TESTIMAGES}/testorig.ppm)
DRC35db75e2014-05-06 22:44:46 +0000577 add_test(cjpeg${suffix}-gray-islow-cmp
DRCf9134382016-02-06 14:09:20 -0600578 ${MD5CMP} ${MD5_JPEG_GRAY_ISLOW} testout_gray_islow.jpg)
579
DRC78df2e62014-05-12 09:23:57 +0000580 # CC: Gray->Gray SAMP: fullsize IDCT: islow ENT: huff
DRC35db75e2014-05-06 22:44:46 +0000581 add_test(djpeg${suffix}-gray-islow
DRCf9134382016-02-06 14:09:20 -0600582 ${dir}djpeg${suffix} -dct int
583 -outfile testout_gray_islow.ppm testout_gray_islow.jpg)
DRC35db75e2014-05-06 22:44:46 +0000584 add_test(djpeg${suffix}-gray-islow-cmp
DRCf9134382016-02-06 14:09:20 -0600585 ${MD5CMP} ${MD5_PPM_GRAY_ISLOW} testout_gray_islow.ppm)
586
DRC78df2e62014-05-12 09:23:57 +0000587 # CC: Gray->RGB SAMP: fullsize IDCT: islow ENT: huff
588 add_test(djpeg${suffix}-gray-islow-rgb
DRCf9134382016-02-06 14:09:20 -0600589 ${dir}djpeg${suffix} -dct int -rgb
590 -outfile testout_gray_islow_rgb.ppm testout_gray_islow.jpg)
DRC4c773cf2014-12-08 23:23:41 +0000591 add_test(djpeg${suffix}-gray-islow-rgb-cmp
DRCf9134382016-02-06 14:09:20 -0600592 ${MD5CMP} ${MD5_PPM_GRAY_ISLOW_RGB} testout_gray_islow_rgb.ppm)
593
DRCaee4f722014-08-09 23:06:07 +0000594 if(NOT WITH_12BIT)
595 # CC: Gray->RGB565 SAMP: fullsize IDCT: islow ENT: huff
596 add_test(djpeg${suffix}-gray-islow-565
597 ${dir}djpeg${suffix} -dct int -rgb565 -dither none -bmp
598 -outfile testout_gray_islow_565.bmp testout_gray_islow.jpg)
599 add_test(djpeg${suffix}-gray-islow-565-cmp
DRCf9134382016-02-06 14:09:20 -0600600 ${MD5CMP} ${MD5_BMP_GRAY_ISLOW_565} testout_gray_islow_565.bmp)
601
DRCaee4f722014-08-09 23:06:07 +0000602 # CC: Gray->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
603 add_test(djpeg${suffix}-gray-islow-565D
604 ${dir}djpeg${suffix} -dct int -rgb565 -bmp
605 -outfile testout_gray_islow_565D.bmp testout_gray_islow.jpg)
606 add_test(djpeg${suffix}-gray-islow-565D-cmp
DRCf9134382016-02-06 14:09:20 -0600607 ${MD5CMP} ${MD5_BMP_GRAY_ISLOW_565D} testout_gray_islow_565D.bmp)
DRCaee4f722014-08-09 23:06:07 +0000608 endif()
DRC35db75e2014-05-06 22:44:46 +0000609
610 # CC: RGB->YCC SAMP: fullsize smooth/h2v2 smooth FDCT: islow
611 # ENT: 2-pass huff
612 add_test(cjpeg${suffix}-420s-ifast-opt
DRCf9134382016-02-06 14:09:20 -0600613 ${dir}cjpeg${suffix} -sample 2x2 -smooth 1 -dct int -opt
614 -outfile testout_420s_ifast_opt.jpg ${TESTIMAGES}/testorig.ppm)
DRC35db75e2014-05-06 22:44:46 +0000615 add_test(cjpeg${suffix}-420s-ifast-opt-cmp
DRCf9134382016-02-06 14:09:20 -0600616 ${MD5CMP} ${MD5_JPEG_420S_IFAST_OPT} testout_420s_ifast_opt.jpg)
DRC35db75e2014-05-06 22:44:46 +0000617
618 # CC: RGB->YCC SAMP: fullsize/int FDCT: float ENT: prog huff
619 add_test(cjpeg${suffix}-3x2-float-prog
620 ${dir}cjpeg${suffix} -sample 3x2 -dct float -prog
DRCf9134382016-02-06 14:09:20 -0600621 -outfile testout_3x2_float_prog.jpg ${TESTIMAGES}/testorig.ppm)
DRC35db75e2014-05-06 22:44:46 +0000622 add_test(cjpeg${suffix}-3x2-float-prog-cmp
DRCf9134382016-02-06 14:09:20 -0600623 ${MD5CMP} ${MD5_JPEG_3x2_FLOAT_PROG} testout_3x2_float_prog.jpg)
624
DRC35db75e2014-05-06 22:44:46 +0000625 # CC: YCC->RGB SAMP: fullsize/int IDCT: float ENT: prog huff
626 add_test(djpeg${suffix}-3x2-float-prog
DRCf9134382016-02-06 14:09:20 -0600627 ${dir}djpeg${suffix} -dct float
628 -outfile testout_3x2_float.ppm testout_3x2_float_prog.jpg)
DRC35db75e2014-05-06 22:44:46 +0000629 add_test(djpeg${suffix}-3x2-float-prog-cmp
DRCf9134382016-02-06 14:09:20 -0600630 ${MD5CMP} ${MD5_PPM_3x2_FLOAT} testout_3x2_float.ppm)
DRC35db75e2014-05-06 22:44:46 +0000631
632 if(WITH_ARITH_ENC)
633 # CC: YCC->RGB SAMP: fullsize/h2v2 FDCT: islow ENT: arith
634 add_test(cjpeg${suffix}-420-islow-ari
635 ${dir}cjpeg${suffix} -dct int -arithmetic
DRCf9134382016-02-06 14:09:20 -0600636 -outfile testout_420_islow_ari.jpg ${TESTIMAGES}/testorig.ppm)
DRC35db75e2014-05-06 22:44:46 +0000637 add_test(cjpeg${suffix}-420-islow-ari-cmp
DRCf9134382016-02-06 14:09:20 -0600638 ${MD5CMP} ${MD5_JPEG_420_ISLOW_ARI} testout_420_islow_ari.jpg)
639
DRC35db75e2014-05-06 22:44:46 +0000640 add_test(jpegtran${suffix}-420-islow-ari
641 ${dir}jpegtran${suffix} -arithmetic
DRCf9134382016-02-06 14:09:20 -0600642 -outfile testout_420_islow_ari.jpg ${TESTIMAGES}/testimgint.jpg)
DRC35db75e2014-05-06 22:44:46 +0000643 add_test(jpegtran${suffix}-420-islow-ari-cmp
DRCf9134382016-02-06 14:09:20 -0600644 ${MD5CMP} ${MD5_JPEG_420_ISLOW_ARI} testout_420_islow_ari.jpg)
645
DRC35db75e2014-05-06 22:44:46 +0000646 # CC: YCC->RGB SAMP: fullsize FDCT: islow ENT: prog arith
647 add_test(cjpeg${suffix}-444-islow-progari
DRC7a7da942015-06-27 08:10:31 +0000648 ${dir}cjpeg${suffix} -sample 1x1 -dct int -prog -arithmetic
DRCf9134382016-02-06 14:09:20 -0600649 -outfile testout_444_islow_progari.jpg ${TESTIMAGES}/testorig.ppm)
DRC35db75e2014-05-06 22:44:46 +0000650 add_test(cjpeg${suffix}-444-islow-progari-cmp
DRCf9134382016-02-06 14:09:20 -0600651 ${MD5CMP} ${MD5_JPEG_444_ISLOW_PROGARI} testout_444_islow_progari.jpg)
DRC35db75e2014-05-06 22:44:46 +0000652 endif()
DRCf9134382016-02-06 14:09:20 -0600653
DRC35db75e2014-05-06 22:44:46 +0000654 if(WITH_ARITH_DEC)
655 # CC: RGB->YCC SAMP: h2v2 merged IDCT: ifast ENT: arith
DRC4c773cf2014-12-08 23:23:41 +0000656 add_test(djpeg${suffix}-420m-ifast-ari
DRCf9134382016-02-06 14:09:20 -0600657 ${dir}djpeg${suffix} -fast -ppm
658 -outfile testout_420m_ifast_ari.ppm ${TESTIMAGES}/testimgari.jpg)
DRC4c773cf2014-12-08 23:23:41 +0000659 add_test(djpeg${suffix}-420m-ifast-ari-cmp
DRCf9134382016-02-06 14:09:20 -0600660 ${MD5CMP} ${MD5_PPM_420M_IFAST_ARI} testout_420m_ifast_ari.ppm)
661
DRC35db75e2014-05-06 22:44:46 +0000662 add_test(jpegtran${suffix}-420-islow
DRCf9134382016-02-06 14:09:20 -0600663 ${dir}jpegtran${suffix}
664 -outfile testout_420_islow.jpg ${TESTIMAGES}/testimgari.jpg)
DRC35db75e2014-05-06 22:44:46 +0000665 add_test(jpegtran${suffix}-420-islow-cmp
DRCf9134382016-02-06 14:09:20 -0600666 ${MD5CMP} ${MD5_JPEG_420_ISLOW} testout_420_islow.jpg)
DRC35db75e2014-05-06 22:44:46 +0000667 endif()
668
669 # 2/1-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 16x16 islow ENT: huff
670 # 15/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 15x15 islow ENT: huff
671 # 13/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 13x13 islow ENT: huff
672 # 11/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 11x11 islow ENT: huff
673 # 9/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 9x9 islow ENT: huff
674 # 7/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 7x7 islow/14x14 islow
675 # ENT: huff
676 # 3/4-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 6x6 islow/12x12 islow
677 # ENT: huff
678 # 5/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 5x5 islow/10x10 islow
679 # ENT: huff
680 # 1/2-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 4x4 islow/8x8 islow
681 # ENT: huff
682 # 3/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 3x3 islow/6x6 islow
683 # ENT: huff
684 # 1/4-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 2x2 islow/4x4 islow
685 # ENT: huff
686 # 1/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 1x1 islow/2x2 islow
687 # ENT: huff
688 foreach(scale 2_1 15_8 13_8 11_8 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8)
689 string(REGEX REPLACE "_" "/" scalearg ${scale})
690 add_test(djpeg${suffix}-420m-islow-${scale}
DRC78df2e62014-05-12 09:23:57 +0000691 ${dir}djpeg${suffix} -dct int -scale ${scalearg} -nosmooth -ppm
DRCf9134382016-02-06 14:09:20 -0600692 -outfile testout_420m_islow_${scale}.ppm ${TESTIMAGES}/${TESTORIG})
DRC35db75e2014-05-06 22:44:46 +0000693 add_test(djpeg${suffix}-420m-islow-${scale}-cmp
DRCf9134382016-02-06 14:09:20 -0600694 ${MD5CMP} ${MD5_PPM_420M_ISLOW_${scale}} testout_420m_islow_${scale}.ppm)
DRC35db75e2014-05-06 22:44:46 +0000695 endforeach()
696
DRCaee4f722014-08-09 23:06:07 +0000697 if(NOT WITH_12BIT)
698 # CC: YCC->RGB (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
699 add_test(djpeg${suffix}-420-islow-256
700 ${dir}djpeg${suffix} -dct int -colors 256 -bmp
DRCf9134382016-02-06 14:09:20 -0600701 -outfile testout_420_islow_256.bmp ${TESTIMAGES}/${TESTORIG})
DRCaee4f722014-08-09 23:06:07 +0000702 add_test(djpeg${suffix}-420-islow-256-cmp
DRCf9134382016-02-06 14:09:20 -0600703 ${MD5CMP} ${MD5_BMP_420_ISLOW_256} testout_420_islow_256.bmp)
704
DRCaee4f722014-08-09 23:06:07 +0000705 # CC: YCC->RGB565 SAMP: h2v2 fancy IDCT: islow ENT: huff
706 add_test(djpeg${suffix}-420-islow-565
707 ${dir}djpeg${suffix} -dct int -rgb565 -dither none -bmp
DRCf9134382016-02-06 14:09:20 -0600708 -outfile testout_420_islow_565.bmp ${TESTIMAGES}/${TESTORIG})
DRCaee4f722014-08-09 23:06:07 +0000709 add_test(djpeg${suffix}-420-islow-565-cmp
DRCf9134382016-02-06 14:09:20 -0600710 ${MD5CMP} ${MD5_BMP_420_ISLOW_565} testout_420_islow_565.bmp)
711
DRCaee4f722014-08-09 23:06:07 +0000712 # CC: YCC->RGB565 (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
713 add_test(djpeg${suffix}-420-islow-565D
714 ${dir}djpeg${suffix} -dct int -rgb565 -bmp
DRCf9134382016-02-06 14:09:20 -0600715 -outfile testout_420_islow_565D.bmp ${TESTIMAGES}/${TESTORIG})
DRCaee4f722014-08-09 23:06:07 +0000716 add_test(djpeg${suffix}-420-islow-565D-cmp
DRCf9134382016-02-06 14:09:20 -0600717 ${MD5CMP} ${MD5_BMP_420_ISLOW_565D} testout_420_islow_565D.bmp)
718
DRCaee4f722014-08-09 23:06:07 +0000719 # CC: YCC->RGB565 SAMP: h2v2 merged IDCT: islow ENT: huff
720 add_test(djpeg${suffix}-420m-islow-565
721 ${dir}djpeg${suffix} -dct int -nosmooth -rgb565 -dither none -bmp
DRCf9134382016-02-06 14:09:20 -0600722 -outfile testout_420m_islow_565.bmp ${TESTIMAGES}/${TESTORIG})
DRCaee4f722014-08-09 23:06:07 +0000723 add_test(djpeg${suffix}-420m-islow-565-cmp
DRCf9134382016-02-06 14:09:20 -0600724 ${MD5CMP} ${MD5_BMP_420M_ISLOW_565} testout_420m_islow_565.bmp)
725
DRCaee4f722014-08-09 23:06:07 +0000726 # CC: YCC->RGB565 (dithered) SAMP: h2v2 merged IDCT: islow ENT: huff
727 add_test(djpeg${suffix}-420m-islow-565D
728 ${dir}djpeg${suffix} -dct int -nosmooth -rgb565 -bmp
DRCf9134382016-02-06 14:09:20 -0600729 -outfile testout_420m_islow_565D.bmp ${TESTIMAGES}/${TESTORIG})
DRCaee4f722014-08-09 23:06:07 +0000730 add_test(djpeg${suffix}-420m-islow-565D-cmp
DRCf9134382016-02-06 14:09:20 -0600731 ${MD5CMP} ${MD5_BMP_420M_ISLOW_565D} testout_420m_islow_565D.bmp)
DRCaee4f722014-08-09 23:06:07 +0000732 endif()
DRC7a7da942015-06-27 08:10:31 +0000733
734 # Partial decode tests. These tests are designed to cover all of the
735 # possible code paths in jpeg_skip_scanlines().
736
737 # Context rows: Yes Intra-iMCU row: Yes iMCU row prefetch: No ENT: huff
738 add_test(djpeg${suffix}-420-islow-skip15_31
739 ${dir}djpeg${suffix} -dct int -skip 15,31 -ppm
DRCf9134382016-02-06 14:09:20 -0600740 -outfile testout_420_islow_skip15,31.ppm ${TESTIMAGES}/${TESTORIG})
DRC7a7da942015-06-27 08:10:31 +0000741 add_test(djpeg${suffix}-420-islow-skip15_31-cmp
DRCf9134382016-02-06 14:09:20 -0600742 ${MD5CMP} ${MD5_PPM_420_ISLOW_SKIP15_31} testout_420_islow_skip15,31.ppm)
743
DRC7a7da942015-06-27 08:10:31 +0000744 # Context rows: Yes Intra-iMCU row: No iMCU row prefetch: Yes ENT: arith
745 if(WITH_ARITH_DEC)
746 add_test(djpeg${suffix}-420-islow-ari-skip16_139
747 ${dir}djpeg${suffix} -dct int -skip 16,139 -ppm
748 -outfile testout_420_islow_ari_skip16,139.ppm
DRCf9134382016-02-06 14:09:20 -0600749 ${TESTIMAGES}/testimgari.jpg)
DRC7a7da942015-06-27 08:10:31 +0000750 add_test(djpeg${suffix}-420-islow-ari_skip16_139-cmp
DRCf9134382016-02-06 14:09:20 -0600751 ${MD5CMP} ${MD5_PPM_420_ISLOW_ARI_SKIP16_139}
752 testout_420_islow_ari_skip16,139.ppm)
DRC7a7da942015-06-27 08:10:31 +0000753 endif()
DRCf9134382016-02-06 14:09:20 -0600754
DRC7a7da942015-06-27 08:10:31 +0000755 # Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: prog huff
756 add_test(cjpeg${suffix}-420-islow-prog
DRCf9134382016-02-06 14:09:20 -0600757 ${dir}cjpeg${suffix} -dct int -prog
758 -outfile testout_420_islow_prog.jpg ${TESTIMAGES}/testorig.ppm)
DRC7a7da942015-06-27 08:10:31 +0000759 add_test(djpeg${suffix}-420-islow-prog-strip71_132
760 ${dir}djpeg${suffix} -dct int -strip 71,132 -ppm
761 -outfile testout_420_islow_strip71,132.ppm testout_420_islow_prog.jpg)
762 add_test(djpeg${suffix}-420-islow-prog-strip71_132-cmp
DRCf9134382016-02-06 14:09:20 -0600763 ${MD5CMP} ${MD5_PPM_420_ISLOW_PROG_STRIP71_132}
764 testout_420_islow_strip71,132.ppm)
765
DRC7a7da942015-06-27 08:10:31 +0000766 # Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: arith
767 if(WITH_ARITH_DEC)
768 add_test(djpeg${suffix}-420-islow-ari-strip4_56
769 ${dir}djpeg${suffix} -dct int -strip 4,56 -ppm
770 -outfile testout_420_islow_ari_strip4,56.ppm
DRCf9134382016-02-06 14:09:20 -0600771 ${TESTIMAGES}/testimgari.jpg)
DRC7a7da942015-06-27 08:10:31 +0000772 add_test(djpeg${suffix}-420-islow-ari-strip4_56-cmp
DRCf9134382016-02-06 14:09:20 -0600773 ${MD5CMP} ${MD5_PPM_420_ISLOW_ARI_STRIP4_56}
774 testout_420_islow_ari_strip4,56.ppm)
DRC7a7da942015-06-27 08:10:31 +0000775 endif()
DRCf9134382016-02-06 14:09:20 -0600776
DRC7a7da942015-06-27 08:10:31 +0000777 # Context rows: No Intra-iMCU row: Yes ENT: huff
778 add_test(cjpeg${suffix}-444-islow
DRCf9134382016-02-06 14:09:20 -0600779 ${dir}cjpeg${suffix} -dct int -sample 1x1
780 -outfile testout_444_islow.jpg ${TESTIMAGES}/testorig.ppm)
DRC7a7da942015-06-27 08:10:31 +0000781 add_test(djpeg${suffix}-444-islow-skip1_6
782 ${dir}djpeg${suffix} -dct int -skip 1,6 -ppm
783 -outfile testout_444_islow_skip1,6.ppm testout_444_islow.jpg)
784 add_test(djpeg${suffix}-444-islow-skip1_6-cmp
DRCf9134382016-02-06 14:09:20 -0600785 ${MD5CMP} ${MD5_PPM_444_ISLOW_SKIP1_6} testout_444_islow_skip1,6.ppm)
786
DRC7a7da942015-06-27 08:10:31 +0000787 # Context rows: No Intra-iMCU row: No ENT: prog huff
788 add_test(cjpeg${suffix}-444-islow-prog
789 ${dir}cjpeg${suffix} -dct int -prog -sample 1x1
DRCf9134382016-02-06 14:09:20 -0600790 -outfile testout_444_islow_prog.jpg ${TESTIMAGES}/testorig.ppm)
DRC7a7da942015-06-27 08:10:31 +0000791 add_test(djpeg${suffix}-444-islow-prog-strip13_110
792 ${dir}djpeg${suffix} -dct int -strip 13,110 -ppm
DRCf9134382016-02-06 14:09:20 -0600793 -outfile testout_444_islow_prog_strip13,110.ppm
794 testout_444_islow_prog.jpg)
DRC7a7da942015-06-27 08:10:31 +0000795 add_test(djpeg${suffix}-444-islow-prog_strip13_110-cmp
DRCf9134382016-02-06 14:09:20 -0600796 ${MD5CMP} ${MD5_PPM_444_ISLOW_PROG_STRIP13_110}
797 testout_444_islow_prog_strip13,110.ppm)
798
DRC7a7da942015-06-27 08:10:31 +0000799 # Context rows: No Intra-iMCU row: No ENT: arith
800 if(WITH_ARITH_ENC)
801 add_test(cjpeg${suffix}-444-islow-ari
802 ${dir}cjpeg${suffix} -dct int -arithmetic -sample 1x1
DRCf9134382016-02-06 14:09:20 -0600803 -outfile testout_444_islow_ari.jpg ${TESTIMAGES}/testorig.ppm)
DRC7a7da942015-06-27 08:10:31 +0000804 if(WITH_ARITH_DEC)
805 add_test(djpeg${suffix}-444-islow-ari-strip0_36
806 ${dir}djpeg${suffix} -dct int -strip 0,36 -ppm
807 -outfile testout_444_islow_ari_strip0,36.ppm
808 testout_444_islow_ari.jpg)
809 add_test(djpeg${suffix}-444-islow-ari-strip0_36-cmp
DRCf9134382016-02-06 14:09:20 -0600810 ${MD5CMP} ${MD5_PPM_444_ISLOW_ARI_STRIP0_36}
811 testout_444_islow_ari_strip0,36.ppm)
DRC7a7da942015-06-27 08:10:31 +0000812 endif()
813 endif()
814
DRC35db75e2014-05-06 22:44:46 +0000815 add_test(jpegtran${suffix}-crop
816 ${dir}jpegtran${suffix} -crop 120x90+20+50 -transpose -perfect
DRCf9134382016-02-06 14:09:20 -0600817 -outfile testout_crop.jpg ${TESTIMAGES}/${TESTORIG})
DRC35db75e2014-05-06 22:44:46 +0000818 add_test(jpegtran${suffix}-crop-cmp
DRCf9134382016-02-06 14:09:20 -0600819 ${MD5CMP} ${MD5_JPEG_CROP} testout_crop.jpg)
DRC35db75e2014-05-06 22:44:46 +0000820
DRC0af8d672012-01-31 11:09:11 +0000821endforeach()
DRC2c0a4e12010-10-16 08:51:43 +0000822
DRCf9134382016-02-06 14:09:20 -0600823add_custom_target(testclean COMMAND ${MD5CMP} -P
DRCa0f878a2011-04-02 04:43:14 +0000824 ${CMAKE_SOURCE_DIR}/cmakescripts/testclean.cmake)
825
DRC2c0a4e12010-10-16 08:51:43 +0000826
827#
828# Installer
829#
830
DRC2c0a4e12010-10-16 08:51:43 +0000831if(MSVC)
832 set(INST_PLATFORM "Visual C++")
DRCb94f2de2011-03-22 09:31:25 +0000833 set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-vc)
DRC7175e512013-04-23 22:29:00 +0000834 set(INST_REG_NAME ${CMAKE_PROJECT_NAME})
DRC2c0a4e12010-10-16 08:51:43 +0000835elseif(MINGW)
836 set(INST_PLATFORM GCC)
DRCb94f2de2011-03-22 09:31:25 +0000837 set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-gcc)
DRC7175e512013-04-23 22:29:00 +0000838 set(INST_REG_NAME ${CMAKE_PROJECT_NAME}-gcc)
DRC2c0a4e12010-10-16 08:51:43 +0000839 set(INST_DEFS -DGCC)
840endif()
841
842if(64BIT)
843 set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
844 set(INST_NAME ${INST_NAME}64)
DRC7175e512013-04-23 22:29:00 +0000845 set(INST_REG_NAME ${INST_DIR}64)
DRC2c0a4e12010-10-16 08:51:43 +0000846 set(INST_DEFS ${INST_DEFS} -DWIN64)
847endif()
848
DRC957d6232011-04-01 11:13:11 +0000849if(WITH_JAVA)
850 set(INST_DEFS ${INST_DEFS} -DJAVA)
851endif()
852
DRC2c0a4e12010-10-16 08:51:43 +0000853if(MSVC_IDE)
DRC926e01f2011-04-06 06:35:38 +0000854 set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
DRC2c0a4e12010-10-16 08:51:43 +0000855else()
856 set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
857endif()
858
DRC9fe22da2014-04-16 23:30:38 +0000859STRING(REGEX REPLACE "/" "\\\\" INST_DIR ${CMAKE_INSTALL_PREFIX})
DRC7175e512013-04-23 22:29:00 +0000860
DRC2c0a4e12010-10-16 08:51:43 +0000861configure_file(release/libjpeg-turbo.nsi.in libjpeg-turbo.nsi @ONLY)
862
DRC7175e512013-04-23 22:29:00 +0000863if(WITH_JAVA)
864 set(JAVA_DEPEND java)
865endif()
DRC2c0a4e12010-10-16 08:51:43 +0000866add_custom_target(installer
867 makensis -nocd ${INST_DEFS} libjpeg-turbo.nsi
DRCb94f2de2011-03-22 09:31:25 +0000868 DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom
DRC7175e512013-04-23 22:29:00 +0000869 cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
DRC2c0a4e12010-10-16 08:51:43 +0000870 SOURCES libjpeg-turbo.nsi)
DRC7284c9a2010-10-16 21:55:14 +0000871
DRCaee4f722014-08-09 23:06:07 +0000872if(WITH_TURBOJPEG)
DRC665c96e2015-05-15 22:08:21 +0000873 if(ENABLE_SHARED)
874 install(TARGETS turbojpeg tjbench
875 ARCHIVE DESTINATION lib
876 LIBRARY DESTINATION lib
877 RUNTIME DESTINATION bin)
878 endif()
879 if(ENABLE_STATIC)
880 install(TARGETS turbojpeg-static ARCHIVE DESTINATION lib)
881 if(NOT ENABLE_SHARED)
882 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tjbench-static.exe
883 DESTINATION bin RENAME tjbench.exe)
884 endif()
885 endif()
886 install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include)
DRCaee4f722014-08-09 23:06:07 +0000887endif()
DRC665c96e2015-05-15 22:08:21 +0000888
889if(ENABLE_STATIC)
890 install(TARGETS jpeg-static ARCHIVE DESTINATION lib)
891 if(NOT ENABLE_SHARED)
892 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe
893 DESTINATION bin RENAME cjpeg.exe)
894 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe
895 DESTINATION bin RENAME djpeg.exe)
896 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jpegtran-static.exe
897 DESTINATION bin RENAME jpegtran.exe)
898 endif()
899endif()
900
901install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION bin)
DRC7284c9a2010-10-16 21:55:14 +0000902
DRC7e3acc02015-10-10 10:25:46 -0500903install(FILES ${CMAKE_SOURCE_DIR}/README.ijg ${CMAKE_SOURCE_DIR}/README.md
DRC9fe22da2014-04-16 23:30:38 +0000904 ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt
DRCa1647c82012-02-10 00:39:05 +0000905 ${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt
906 ${CMAKE_SOURCE_DIR}/wizard.txt
DRC7284c9a2010-10-16 21:55:14 +0000907 DESTINATION doc)
DRCe2befde2010-10-17 07:28:08 +0000908
909install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h
910 ${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h
DRC665c96e2015-05-15 22:08:21 +0000911 DESTINATION include)