UI: Refactor timecode functions into BLI_timecode
[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
109 if(WITH_OPENIMAGEIO)
110         add_definitions(-DWITH_OPENIMAGEIO)
111 endif()
112
113 if(WITH_IMAGE_OPENJPEG)
114         list(APPEND INC_SYS
115                 ${OPENJPEG_INCLUDE_DIRS}
116         )
117         list(APPEND SRC
118                 intern/jp2.c
119         )
120
121         add_definitions(-DWITH_OPENJPEG)
122 endif()
123
124 if(WITH_IMAGE_REDCODE)
125         list(APPEND INC_SYS
126                 ${REDCODE_INC}
127         )
128         add_definitions(-DWITH_REDCODE)
129 endif()
130
131 if(WITH_CODEC_AVI)
132         list(APPEND INC
133                 ../avi
134         )
135         add_definitions(-DWITH_AVI)
136 endif()
137
138 if(WITH_CODEC_QUICKTIME)
139         list(APPEND INC
140                 ../quicktime
141         )
142         list(APPEND INC_SYS
143                 ${QUICKTIME_INCLUDE_DIRS}
144         )
145         add_definitions(-DWITH_QUICKTIME)
146 endif()
147
148 if(WITH_CODEC_FFMPEG)
149         list(APPEND INC
150                 ../../../intern/ffmpeg
151         )
152         list(APPEND INC_SYS
153                 ${FFMPEG_INCLUDE_DIRS}
154         )
155         add_definitions(-DWITH_FFMPEG)
156
157         remove_strict_flags_file(
158                 intern/indexer.c
159                 intern/util.c
160                 intern/anim_movie.c
161         )
162 endif()
163
164 if(WITH_IMAGE_DDS)
165         add_definitions(-DWITH_DDS)
166 endif()
167
168 if(WITH_IMAGE_CINEON)
169         add_definitions(-DWITH_CINEON)
170 endif()
171
172 if(WITH_IMAGE_HDR)
173         list(APPEND SRC
174                 intern/radiance_hdr.c
175         )
176         add_definitions(-DWITH_HDR)
177 endif()
178
179 list(APPEND INC
180         ../../../intern/opencolorio
181 )
182
183 if(WIN32)
184         list(APPEND INC
185                 ../../../intern/utfconv
186         )
187 endif()
188
189 blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")