Merging r49624 through r49628 from trunk into soc-2011-tomato
[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 set(INC 
27         .
28         ../avi
29         ../blenkernel
30         ../blenlib
31         ../blenloader
32         ../makesdna
33         ../makesrna
34         ../../../intern/guardedalloc
35         ../../../intern/memutil
36 )
37
38 set(INC_SYS
39         ${JPEG_INCLUDE_DIR}
40         ${PNG_INCLUDE_DIR}
41         ${ZLIB_INCLUDE_DIRS}
42 )
43
44 set(SRC
45         intern/allocimbuf.c
46         intern/anim_movie.c
47         intern/bmp.c
48         intern/cache.c
49         intern/colormanagement.c
50         intern/divers.c
51         intern/filetype.c
52         intern/filter.c
53         intern/imageprocess.c
54         intern/indexer.c
55         intern/indexer_dv.c
56         intern/iris.c
57         intern/jpeg.c
58         intern/metadata.c
59         intern/module.c
60         intern/moviecache.c
61         intern/png.c
62         intern/readimage.c
63         intern/rectop.c
64         intern/rotate.c
65         intern/scaling.c
66         intern/targa.c
67         intern/thumbs.c
68         intern/thumbs_blend.c
69         intern/util.c
70         intern/writeimage.c
71
72         IMB_colormanagement.h
73         IMB_imbuf.h
74         IMB_imbuf_types.h
75         IMB_moviecache.h
76         IMB_thumbs.h
77         intern/IMB_allocimbuf.h
78         intern/IMB_anim.h
79         intern/IMB_filetype.h
80         intern/IMB_filter.h
81         intern/IMB_indexer.h
82         intern/IMB_metadata.h
83         intern/cineon/cin_debug_stuff.h
84         intern/cineon/cineonfile.h
85         intern/cineon/cineonlib.h
86         intern/cineon/dpxfile.h
87         intern/cineon/dpxlib.h
88         intern/cineon/logImageCore.h
89         intern/cineon/logImageLib.h
90         intern/cineon/logmemfile.h
91         intern/dds/BlockDXT.h
92         intern/dds/Color.h
93         intern/dds/ColorBlock.h
94         intern/dds/Common.h
95         intern/dds/DirectDrawSurface.h
96         intern/dds/Image.h
97         intern/dds/PixelFormat.h
98         intern/dds/Stream.h
99         intern/dds/dds_api.h
100         intern/imbuf.h
101         intern/openexr/openexr_api.h
102         intern/openexr/openexr_multi.h
103         
104         # orphan include
105         ../../../intern/ffmpeg/ffmpeg_compat.h
106 )
107
108 if(WITH_IMAGE_OPENEXR)
109         add_definitions(-DWITH_OPENEXR)
110 else()
111         list(APPEND SRC
112                 intern/openexr/openexr_stub.cpp
113         )
114 endif()
115
116 if(WITH_IMAGE_TIFF)
117         list(APPEND INC_SYS
118                 ${TIFF_INCLUDE_DIR}
119         )
120         list(APPEND SRC
121                 intern/tiff.c
122         )
123
124         add_definitions(-DWITH_TIFF)
125 endif()
126
127 if(WITH_IMAGE_OPENJPEG)
128         list(APPEND INC_SYS
129                 ${OPENJPEG_INCLUDE_DIRS}
130         )
131         list(APPEND SRC
132                 intern/jp2.c
133         )
134
135         add_definitions(-DWITH_OPENJPEG)
136 endif()
137
138 if(WITH_IMAGE_REDCODE)
139         list(APPEND INC_SYS
140                 ${REDCODE_INC}
141         )
142         add_definitions(-DWITH_REDCODE)
143 endif()
144
145 if(WITH_CODEC_QUICKTIME)
146         list(APPEND INC
147                 ../quicktime
148         )
149         list(APPEND INC_SYS
150                 ${QUICKTIME_INCLUDE_DIRS}
151         )
152         add_definitions(-DWITH_QUICKTIME)
153 endif()
154
155 if(WITH_CODEC_FFMPEG)
156         list(APPEND INC
157                 ../../../intern/ffmpeg
158         )
159         list(APPEND INC_SYS
160                 ${FFMPEG_INCLUDE_DIRS}
161         )
162         add_definitions(-DWITH_FFMPEG)
163
164         remove_strict_flags_file(
165                 intern/indexer.c
166                 intern/util.c
167                 intern/anim_movie.c
168         )
169 endif()
170
171 if(WITH_IMAGE_DDS)
172         add_definitions(-DWITH_DDS)
173 endif()
174
175 if(WITH_IMAGE_CINEON)
176         add_definitions(-DWITH_CINEON)
177 endif()
178
179 if(WITH_IMAGE_HDR)
180         list(APPEND SRC
181                 intern/radiance_hdr.c
182         )
183         add_definitions(-DWITH_HDR)
184 endif()
185
186 if(WITH_OPENCOLORIO)
187         list(APPEND SRC
188         )
189         list(APPEND INC
190                 ../../../intern/opencolorio
191         )
192         add_definitions(-DWITH_OCIO)
193 endif()
194
195 if(WIN32)
196         list(APPEND INC
197                 ../../../intern/utfconv
198         )
199 endif()
200
201 blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")