3 INCLUDE_REGULAR_EXPRESSION("^(jchuff|jconfig|jdct|jdhuff|jerror|jinclude|jmemsys|jmorecfg|jpegint|jpeglib|jversion|jpeg).*$")
5 # memmgr back ends: compile only one of these into a working library
6 # (For now, let's use the mode that requires the image fit into memory.
7 # This is the recommended mode for Win32 anyway.)
8 SET(systemdependent_SRCS jmemnobs.c)
10 # library object files common to compression and decompression
12 jcomapi.c jutils.c jerror.c jmemmgr.c
15 # compression library object files
17 jcapimin.c jcapistd.c jctrans.c jcparam.c jcinit.c
18 jcmaster.c jcmarker.c jcmainct.c jcprepct.c jccoefct.c jccolor.c
19 jcsample.c jchuff.c jcphuff.c jcdctmgr.c jfdctfst.c jfdctflt.c
40 # decompression library object files
41 SET(decompression_SRCS
42 jdapimin.c jdapistd.c jdtrans.c jdmaster.c
43 jdinput.c jdmarker.c jdhuff.c jdphuff.c jdmainct.c jdcoefct.c
44 jdpostct.c jddctmgr.c jidctfst.c jidctflt.c jidctint.c jidctred.c
45 jdsample.c jdcolor.c jquant1.c jquant2.c jdmerge.c
66 # jmorecfg.h #this one need to be configured
76 ${systemdependent_SRCS}
83 SET(JPEG_SOURCES ${JPEG_SOURCES}
84 "${GDCMJPEG_SOURCE_DIR}/${src}")
88 IF (BUILD_SHARED_LIBS)
89 #ADD_DEFINITIONS(-DJPEGDLL)
91 ELSE (BUILD_SHARED_LIBS)
92 #ADD_DEFINITIONS(-DJPEGSTATIC)
94 ENDIF (BUILD_SHARED_LIBS)
97 CONFIGURE_FILE(${GDCMJPEG_SOURCE_DIR}/.NoDartCoverage
98 ${GDCMJPEG_BINARY_DIR}/.NoDartCoverage)
100 # Generate three libraries: jpeg 8bits, 12bits and 16bits
101 # using only one source directory
103 # Particular case jmorecfg.h needs to be specified either 8, 12 or 16 bits:
104 FOREACH(bits 8 12 16)
105 SET(CMAKE_BITS_IN_JSAMPLE ${bits})
106 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h.in
107 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jmorecfg.h @ONLY IMMEDIATE)
108 SET(BITS_TYPE_JPEG_MANGLE_NAME "gdcmjpeg/mangle_jpeg${bits}bits.h")
109 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jconfig.h.in
110 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jconfig.h @ONLY IMMEDIATE)
111 # Dummy copy for GDCM to include <gdcmjpeg/8/jpeglib.h> with no conflict
112 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
113 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jpeglib.h COPYONLY IMMEDIATE)
114 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jerror.h
115 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jerror.h COPYONLY IMMEDIATE)
116 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jinclude.h
117 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jinclude.h COPYONLY IMMEDIATE)