svn merge ^/trunk/blender -r41227:41230 . --accept=theirs-full
[blender.git] / source / blender / imbuf / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Jacques Beaurain.
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 if(WITH_CODEC_FFMPEG)
27         # FFMPEG gives warnigns which are hard to avoid across multiple versions.
28         remove_strict_flags()
29 endif()
30
31 set(INC 
32         .
33         ../avi
34         ../blenkernel
35         ../blenlib
36         ../blenloader
37         ../makesdna
38         ../../../intern/guardedalloc
39         ../../../intern/memutil
40 )
41
42 set(INC_SYS
43         ${JPEG_INCLUDE_DIR}
44         ${PNG_INCLUDE_DIR}
45         ${ZLIB_INCLUDE_DIRS}
46 )
47
48 set(SRC
49         intern/allocimbuf.c
50         intern/anim_movie.c
51         intern/bmp.c
52         intern/cache.c
53         intern/divers.c
54         intern/filetype.c
55         intern/filter.c
56         intern/imageprocess.c
57         intern/indexer.c
58         intern/indexer_dv.c
59         intern/iris.c
60         intern/jpeg.c
61         intern/md5.c
62         intern/metadata.c
63         intern/module.c
64         intern/png.c
65         intern/readimage.c
66         intern/rectop.c
67         intern/rotate.c
68         intern/scaling.c
69         intern/targa.c
70         intern/thumbs.c
71         intern/thumbs_blend.c
72         intern/util.c
73         intern/writeimage.c
74
75         IMB_imbuf.h
76         IMB_imbuf_types.h
77         IMB_thumbs.h
78         intern/IMB_allocimbuf.h
79         intern/IMB_anim.h
80         intern/IMB_filetype.h
81         intern/IMB_filter.h
82         intern/IMB_indexer.h
83         intern/IMB_metadata.h
84         intern/cineon/cin_debug_stuff.h
85         intern/cineon/cineonfile.h
86         intern/cineon/cineonlib.h
87         intern/cineon/dpxfile.h
88         intern/cineon/dpxlib.h
89         intern/cineon/logImageCore.h
90         intern/cineon/logImageLib.h
91         intern/cineon/logmemfile.h
92         intern/dds/BlockDXT.h
93         intern/dds/Color.h
94         intern/dds/ColorBlock.h
95         intern/dds/Common.h
96         intern/dds/DirectDrawSurface.h
97         intern/dds/Image.h
98         intern/dds/PixelFormat.h
99         intern/dds/Stream.h
100         intern/dds/dds_api.h
101         intern/imbuf.h
102         intern/md5.h
103         intern/openexr/openexr_api.h
104         intern/openexr/openexr_multi.h
105         
106         # orphan include
107         ../../../intern/ffmpeg/ffmpeg_compat.h
108 )
109
110 if(WITH_IMAGE_OPENEXR)
111         add_definitions(-DWITH_OPENEXR)
112 endif()
113
114 if(WITH_IMAGE_TIFF)
115         list(APPEND INC_SYS
116                 ${TIFF_INCLUDE_DIR}
117         )
118         list(APPEND SRC
119                 intern/tiff.c
120         )
121
122         add_definitions(-DWITH_TIFF)
123 endif()
124
125 if(WITH_IMAGE_OPENJPEG)
126         list(APPEND INC_SYS
127                 ${OPENJPEG_INCLUDE_DIRS}
128         )
129         list(APPEND SRC
130                 intern/jp2.c
131         )
132
133         add_definitions(-DWITH_OPENJPEG)
134 endif()
135
136 if(WITH_IMAGE_REDCODE)
137         list(APPEND INC_SYS
138                 ${REDCODE_INC}
139         )
140         add_definitions(-DWITH_REDCODE)
141 endif()
142
143 if(WITH_CODEC_QUICKTIME)
144         list(APPEND INC
145                 ../quicktime
146         )
147         list(APPEND INC_SYS
148                 ${QUICKTIME_INCLUDE_DIRS}
149         )
150         add_definitions(-DWITH_QUICKTIME)
151 endif()
152
153 if(WITH_CODEC_FFMPEG)
154         list(APPEND INC
155                 ../../../intern/ffmpeg
156         )
157         list(APPEND INC_SYS
158                 ${FFMPEG_INCLUDE_DIRS}
159         )
160         add_definitions(-DWITH_FFMPEG)
161 endif()
162
163 if(WITH_IMAGE_DDS)
164         add_definitions(-DWITH_DDS)
165 endif()
166
167 if(WITH_IMAGE_CINEON)
168         add_definitions(-DWITH_CINEON)
169 endif()
170
171 if(WITH_IMAGE_HDR)
172         list(APPEND SRC
173                 intern/radiance_hdr.c
174         )
175         add_definitions(-DWITH_HDR)
176 endif()
177
178 blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")