cmake macro to set less strict flags per file - remove_strict_flags_file(file, file...)
[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         ../../../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/divers.c
49         intern/filetype.c
50         intern/filter.c
51         intern/imageprocess.c
52         intern/indexer.c
53         intern/indexer_dv.c
54         intern/iris.c
55         intern/jpeg.c
56         intern/md5.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_imbuf.h
72         IMB_imbuf_types.h
73         IMB_moviecache.h
74         IMB_thumbs.h
75         intern/IMB_allocimbuf.h
76         intern/IMB_anim.h
77         intern/IMB_filetype.h
78         intern/IMB_filter.h
79         intern/IMB_indexer.h
80         intern/IMB_metadata.h
81         intern/cineon/cin_debug_stuff.h
82         intern/cineon/cineonfile.h
83         intern/cineon/cineonlib.h
84         intern/cineon/dpxfile.h
85         intern/cineon/dpxlib.h
86         intern/cineon/logImageCore.h
87         intern/cineon/logImageLib.h
88         intern/cineon/logmemfile.h
89         intern/dds/BlockDXT.h
90         intern/dds/Color.h
91         intern/dds/ColorBlock.h
92         intern/dds/Common.h
93         intern/dds/DirectDrawSurface.h
94         intern/dds/Image.h
95         intern/dds/PixelFormat.h
96         intern/dds/Stream.h
97         intern/dds/dds_api.h
98         intern/imbuf.h
99         intern/md5.h
100         intern/openexr/openexr_api.h
101         intern/openexr/openexr_multi.h
102         
103         # orphan include
104         ../../../intern/ffmpeg/ffmpeg_compat.h
105 )
106
107 if(WITH_IMAGE_OPENEXR)
108         add_definitions(-DWITH_OPENEXR)
109 endif()
110
111 if(WITH_IMAGE_TIFF)
112         list(APPEND INC_SYS
113                 ${TIFF_INCLUDE_DIR}
114         )
115         list(APPEND SRC
116                 intern/tiff.c
117         )
118
119         add_definitions(-DWITH_TIFF)
120 endif()
121
122 if(WITH_IMAGE_OPENJPEG)
123         list(APPEND INC_SYS
124                 ${OPENJPEG_INCLUDE_DIRS}
125         )
126         list(APPEND SRC
127                 intern/jp2.c
128         )
129
130         add_definitions(-DWITH_OPENJPEG)
131 endif()
132
133 if(WITH_IMAGE_REDCODE)
134         list(APPEND INC_SYS
135                 ${REDCODE_INC}
136         )
137         add_definitions(-DWITH_REDCODE)
138 endif()
139
140 if(WITH_CODEC_QUICKTIME)
141         list(APPEND INC
142                 ../quicktime
143         )
144         list(APPEND INC_SYS
145                 ${QUICKTIME_INCLUDE_DIRS}
146         )
147         add_definitions(-DWITH_QUICKTIME)
148 endif()
149
150 if(WITH_CODEC_FFMPEG)
151         list(APPEND INC
152                 ../../../intern/ffmpeg
153         )
154         list(APPEND INC_SYS
155                 ${FFMPEG_INCLUDE_DIRS}
156         )
157         add_definitions(-DWITH_FFMPEG)
158
159         remove_strict_flags_file(
160                 intern/indexer.c
161                 intern/util.c
162                 intern/anim_movie.c
163         )
164 endif()
165
166 if(WITH_IMAGE_DDS)
167         add_definitions(-DWITH_DDS)
168 endif()
169
170 if(WITH_IMAGE_CINEON)
171         add_definitions(-DWITH_CINEON)
172 endif()
173
174 if(WITH_IMAGE_HDR)
175         list(APPEND SRC
176                 intern/radiance_hdr.c
177         )
178         add_definitions(-DWITH_HDR)
179 endif()
180
181 blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")