Merged changes in the trunk up to revision 51448.
[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         ../blenkernel
29         ../blenlib
30         ../blenloader
31         ../makesdna
32         ../makesrna
33         ../../../intern/guardedalloc
34         ../../../intern/memutil
35 )
36
37 set(INC_SYS
38         ${JPEG_INCLUDE_DIR}
39         ${PNG_INCLUDE_DIR}
40         ${ZLIB_INCLUDE_DIRS}
41 )
42
43 set(SRC
44         intern/allocimbuf.c
45         intern/anim_movie.c
46         intern/bmp.c
47         intern/cache.c
48         intern/colormanagement.c
49         intern/divers.c
50         intern/filetype.c
51         intern/filter.c
52         intern/imageprocess.c
53         intern/indexer.c
54         intern/indexer_dv.c
55         intern/iris.c
56         intern/jpeg.c
57         intern/metadata.c
58         intern/module.c
59         intern/moviecache.c
60         intern/png.c
61         intern/readimage.c
62         intern/rectop.c
63         intern/rotate.c
64         intern/scaling.c
65         intern/targa.c
66         intern/thumbs.c
67         intern/thumbs_blend.c
68         intern/util.c
69         intern/writeimage.c
70
71         IMB_colormanagement.h
72         IMB_imbuf.h
73         IMB_imbuf_types.h
74         IMB_moviecache.h
75         IMB_thumbs.h
76         intern/IMB_allocimbuf.h
77         intern/IMB_anim.h
78         intern/IMB_colormanagement_intern.h
79         intern/IMB_filetype.h
80         intern/IMB_filter.h
81         intern/IMB_indexer.h
82         intern/IMB_metadata.h
83         intern/imbuf.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/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_AVI)
146         list(APPEND INC
147                 ../avi
148         )
149         add_definitions(-DWITH_AVI)
150 endif()
151
152 if(WITH_CODEC_QUICKTIME)
153         list(APPEND INC
154                 ../quicktime
155         )
156         list(APPEND INC_SYS
157                 ${QUICKTIME_INCLUDE_DIRS}
158         )
159         add_definitions(-DWITH_QUICKTIME)
160 endif()
161
162 if(WITH_CODEC_FFMPEG)
163         list(APPEND INC
164                 ../../../intern/ffmpeg
165         )
166         list(APPEND INC_SYS
167                 ${FFMPEG_INCLUDE_DIRS}
168         )
169         add_definitions(-DWITH_FFMPEG)
170
171         remove_strict_flags_file(
172                 intern/indexer.c
173                 intern/util.c
174                 intern/anim_movie.c
175         )
176 endif()
177
178 if(WITH_IMAGE_DDS)
179         add_definitions(-DWITH_DDS)
180 endif()
181
182 if(WITH_IMAGE_CINEON)
183         add_definitions(-DWITH_CINEON)
184 endif()
185
186 if(WITH_IMAGE_HDR)
187         list(APPEND SRC
188                 intern/radiance_hdr.c
189         )
190         add_definitions(-DWITH_HDR)
191 endif()
192
193 list(APPEND INC
194         ../../../intern/opencolorio
195 )
196
197 if(WIN32)
198         list(APPEND INC
199                 ../../../intern/utfconv
200         )
201 endif()
202
203 blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")