7 # memmgr back ends: compile only one of these into a working library
8 # (For now, let's use the mode that requires the image fit into memory.
9 # This is the recommended mode for Win32 anyway.)
10 SET(systemdependent_SRCS jmemnobs.c)
12 # library object files common to compression and decompression
14 jcomapi.c jutils.c jerror.c jmemmgr.c
17 # compression library object files
19 jcapimin.c jcapistd.c jctrans.c jcparam.c jdatadst.c jcinit.c
20 jcmaster.c jcmarker.c jcmainct.c jcprepct.c jccoefct.c jccolor.c
21 jcsample.c jchuff.c jcphuff.c jcdctmgr.c jfdctfst.c jfdctflt.c
25 # decompression library object files
26 SET(decompression_SRCS
27 jdapimin.c jdapistd.c jdtrans.c jdatasrc.c jdmaster.c
28 jdinput.c jdmarker.c jdhuff.c jdphuff.c jdmainct.c jdcoefct.c
29 jdpostct.c jddctmgr.c jidctfst.c jidctflt.c jidctint.c jidctred.c
30 jdsample.c jdcolor.c jquant1.c jquant2.c jdmerge.c
40 # jmorecfg.h #no this one need to be configured
47 ${systemdependent_SRCS}
54 IF (BUILD_SHARED_LIBS)
55 ADD_DEFINITIONS(-DJPEGDLL)
56 ELSE (BUILD_SHARED_LIBS)
57 ADD_DEFINITIONS(-DJPEGSTATIC)
58 ENDIF (BUILD_SHARED_LIBS)
61 # Attempt to generate two libraries: jpeg 8bits and 12 bits using only one
66 FOREACH(file ${JPEG_SOURCES})
67 # Duplicate jpeg source in subdir libijg8
68 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libijg/${file}"
69 "${CMAKE_CURRENT_BINARY_DIR}/libijg8/${file}"
71 SET(JPEG8_SOURCES ${JPEG8_SOURCES} "${CMAKE_CURRENT_BINARY_DIR}/libijg8/${file}")
73 SET(BITS_TYPE_JPEG_MANGLE_NAME gdcm_mangle_8bits.h)
74 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libijg/jconfig.h.in
75 ${CMAKE_CURRENT_BINARY_DIR}/libijg8/jconfig.h @ONLY IMMEDIATE)
76 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libijg/gdcm_mangle_8bits.h
77 ${CMAKE_CURRENT_BINARY_DIR}/libijg8/gdcm_mangle_8bits.h @ONLY IMMEDIATE)
79 # Duplicate jpeg source in subdir libijg12
80 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libijg/${file}"
81 "${CMAKE_CURRENT_BINARY_DIR}/libijg12/${file}"
83 SET(JPEG12_SOURCES ${JPEG12_SOURCES} "${CMAKE_CURRENT_BINARY_DIR}/libijg12/${file}")
85 SET(BITS_TYPE_JPEG_MANGLE_NAME gdcm_mangle_12bits.h)
86 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libijg/jconfig.h.in
87 ${CMAKE_CURRENT_BINARY_DIR}/libijg12/jconfig.h @ONLY IMMEDIATE)
88 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libijg/gdcm_mangle_12bits.h
89 ${CMAKE_CURRENT_BINARY_DIR}/libijg12/gdcm_mangle_12bits.h @ONLY IMMEDIATE)
92 # Now copy the header file
93 FOREACH(file ${JPEG_HEADER_FILES})
94 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libijg/${file}"
95 "${CMAKE_CURRENT_BINARY_DIR}/libijg8/${file}"
97 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libijg/${file}"
98 "${CMAKE_CURRENT_BINARY_DIR}/libijg12/${file}"
101 # Particular case jmorecfg.h needs to be specified either 8 or 12 bits:
102 SET(GDCM_BITS_IN_JSAMPLE 8)
103 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libijg/jmorecfg.h
104 ${CMAKE_CURRENT_BINARY_DIR}/libijg8/jmorecfg.h @ONLY IMMEDIATE)
106 SET(GDCM_BITS_IN_JSAMPLE 12)
107 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libijg/jmorecfg.h
108 ${CMAKE_CURRENT_BINARY_DIR}/libijg12/jmorecfg.h @ONLY IMMEDIATE)