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 # By default support DICOMObjects bug, if this is a speed penalty for you
98 # you should consider disabling it
99 SET(SUPPORT_DICOMOBJECTS_BUG ON)
101 CONFIGURE_FILE(${GDCMJPEG_SOURCE_DIR}/.NoDartCoverage
102 ${GDCMJPEG_BINARY_DIR}/.NoDartCoverage)
104 # Generate three libraries: jpeg 8bits, 12bits and 16bits
105 # using only one source directory
107 # Particular case jmorecfg.h needs to be specified either 8, 12 or 16 bits:
108 FOREACH(bits 8 12 16)
109 SET(CMAKE_BITS_IN_JSAMPLE ${bits})
110 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h.in
111 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jmorecfg.h @ONLY IMMEDIATE)
112 SET(BITS_TYPE_JPEG_MANGLE_NAME "gdcmjpeg/mangle_jpeg${bits}bits.h")
113 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jconfig.h.in
114 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jconfig.h @ONLY IMMEDIATE)
115 # Dummy copy for GDCM to include <gdcmjpeg/8/jpeglib.h> with no conflict
116 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
117 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jpeglib.h COPYONLY IMMEDIATE)
118 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jerror.h
119 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jerror.h COPYONLY IMMEDIATE)
120 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/jinclude.h
121 ${CMAKE_CURRENT_BINARY_DIR}/${bits}/jinclude.h COPYONLY IMMEDIATE)