Merged revision(s) 58585-58681 from trunk/blender into soc-2013-dingto.
[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         
85         # orphan include
86         ../../../intern/ffmpeg/ffmpeg_compat.h
87 )
88
89 if(WITH_IMAGE_OPENEXR)
90         add_definitions(-DWITH_OPENEXR)
91 else()
92         list(APPEND SRC
93                 intern/openexr/openexr_stub.cpp
94         )
95 endif()
96
97 if(WITH_IMAGE_TIFF)
98         list(APPEND INC_SYS
99                 ${TIFF_INCLUDE_DIR}
100         )
101         list(APPEND SRC
102                 intern/tiff.c
103         )
104
105         add_definitions(-DWITH_TIFF)
106 endif()
107
108 if(WITH_IMAGE_OPENJPEG)
109         list(APPEND INC_SYS
110                 ${OPENJPEG_INCLUDE_DIRS}
111         )
112         list(APPEND SRC
113                 intern/jp2.c
114         )
115
116         add_definitions(-DWITH_OPENJPEG)
117 endif()
118
119 if(WITH_IMAGE_REDCODE)
120         list(APPEND INC_SYS
121                 ${REDCODE_INC}
122         )
123         add_definitions(-DWITH_REDCODE)
124 endif()
125
126 if(WITH_CODEC_AVI)
127         list(APPEND INC
128                 ../avi
129         )
130         add_definitions(-DWITH_AVI)
131 endif()
132
133 if(WITH_CODEC_QUICKTIME)
134         list(APPEND INC
135                 ../quicktime
136         )
137         list(APPEND INC_SYS
138                 ${QUICKTIME_INCLUDE_DIRS}
139         )
140         add_definitions(-DWITH_QUICKTIME)
141 endif()
142
143 if(WITH_CODEC_FFMPEG)
144         list(APPEND INC
145                 ../../../intern/ffmpeg
146         )
147         list(APPEND INC_SYS
148                 ${FFMPEG_INCLUDE_DIRS}
149         )
150         add_definitions(-DWITH_FFMPEG)
151
152         remove_strict_flags_file(
153                 intern/indexer.c
154                 intern/util.c
155                 intern/anim_movie.c
156         )
157 endif()
158
159 if(WITH_IMAGE_DDS)
160         add_definitions(-DWITH_DDS)
161 endif()
162
163 if(WITH_IMAGE_CINEON)
164         add_definitions(-DWITH_CINEON)
165 endif()
166
167 if(WITH_IMAGE_HDR)
168         list(APPEND SRC
169                 intern/radiance_hdr.c
170         )
171         add_definitions(-DWITH_HDR)
172 endif()
173
174 list(APPEND INC
175         ../../../intern/opencolorio
176 )
177
178 if(WIN32)
179         list(APPEND INC
180                 ../../../intern/utfconv
181         )
182 endif()
183
184 blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")