Cycles: Fix debug compilation after tile stealing commit
[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 # ***** END GPL LICENSE BLOCK *****
20
21 set(INC
22   .
23   ../blenkernel
24   ../blenlib
25   ../blenloader
26   ../gpu
27   ../makesdna
28   ../makesrna
29   ../sequencer
30   ../../../intern/guardedalloc
31   ../../../intern/memutil
32 )
33
34 set(INC_SYS
35   ${JPEG_INCLUDE_DIR}
36   ${PNG_INCLUDE_DIRS}
37   ${ZLIB_INCLUDE_DIRS}
38 )
39
40 set(SRC
41   intern/allocimbuf.c
42   intern/anim_movie.c
43   intern/bmp.c
44   intern/cache.c
45   intern/colormanagement.c
46   intern/colormanagement_inline.c
47   intern/divers.c
48   intern/filetype.c
49   intern/filter.c
50   intern/imageprocess.c
51   intern/indexer.c
52   intern/iris.c
53   intern/jpeg.c
54   intern/metadata.c
55   intern/module.c
56   intern/moviecache.c
57   intern/png.c
58   intern/readimage.c
59   intern/rectop.c
60   intern/rotate.c
61   intern/scaling.c
62   intern/stereoimbuf.c
63   intern/targa.c
64   intern/thumbs.c
65   intern/thumbs_blend.c
66   intern/thumbs_font.c
67   intern/util.c
68   intern/util_gpu.c
69   intern/writeimage.c
70
71   IMB_colormanagement.h
72   IMB_imbuf.h
73   IMB_imbuf_types.h
74   IMB_metadata.h
75   IMB_moviecache.h
76   IMB_thumbs.h
77   intern/IMB_allocimbuf.h
78   intern/IMB_anim.h
79   intern/IMB_colormanagement_intern.h
80   intern/IMB_filetype.h
81   intern/IMB_filter.h
82   intern/IMB_indexer.h
83   intern/imbuf.h
84
85   # orphan include
86   ../../../intern/ffmpeg/ffmpeg_compat.h
87 )
88
89 set(LIB
90   bf_blenkernel
91   bf_blenlib
92   bf_blenloader
93   bf_intern_guardedalloc
94   bf_intern_memutil
95   bf_intern_opencolorio
96
97   ${PNG_LIBRARIES}
98   ${JPEG_LIBRARIES}
99 )
100
101 if(WITH_IMAGE_OPENEXR)
102   list(APPEND LIB
103     bf_imbuf_openexr
104   )
105   add_definitions(-DWITH_OPENEXR)
106 else()
107   list(APPEND SRC
108     intern/openexr/openexr_stub.cpp
109   )
110 endif()
111
112 if(WITH_IMAGE_TIFF)
113   list(APPEND INC_SYS
114     ${TIFF_INCLUDE_DIR}
115   )
116   list(APPEND SRC
117     intern/tiff.c
118   )
119   list(APPEND LIB
120     ${TIFF_LIBRARY}
121   )
122   add_definitions(-DWITH_TIFF)
123 endif()
124
125
126 if(WITH_OPENIMAGEIO)
127   list(APPEND LIB
128     bf_imbuf_openimageio
129   )
130   add_definitions(-DWITH_OPENIMAGEIO)
131 endif()
132
133 if(WITH_IMAGE_OPENJPEG)
134   list(APPEND INC_SYS
135     ${OPENJPEG_INCLUDE_DIRS}
136   )
137   list(APPEND SRC
138     intern/jp2.c
139   )
140   list(APPEND LIB
141     ${OPENJPEG_LIBRARIES}
142   )
143
144   add_definitions(-DWITH_OPENJPEG ${OPENJPEG_DEFINES})
145 endif()
146
147 if(WITH_CODEC_AVI)
148   list(APPEND INC
149     ../io/avi
150   )
151   list(APPEND LIB
152     bf_avi
153   )
154   add_definitions(-DWITH_AVI)
155 endif()
156
157 if(WITH_CODEC_FFMPEG)
158   list(APPEND INC
159     ../../../intern/ffmpeg
160   )
161   list(APPEND INC_SYS
162     ${FFMPEG_INCLUDE_DIRS}
163   )
164   list(APPEND LIB
165     ${FFMPEG_LIBRARIES}
166     ${OPENJPEG_LIBRARIES}
167   )
168   add_definitions(-DWITH_FFMPEG)
169
170   remove_strict_c_flags_file(
171     intern/anim_movie.c
172     intern/indexer.c
173     intern/util.c
174   )
175 endif()
176
177 if(WITH_IMAGE_DDS)
178   list(APPEND LIB
179     bf_imbuf_dds
180   )
181   add_definitions(-DWITH_DDS)
182 endif()
183
184 if(WITH_IMAGE_CINEON)
185   list(APPEND LIB
186     bf_imbuf_cineon
187   )
188   add_definitions(-DWITH_CINEON)
189 endif()
190
191 if(WITH_IMAGE_HDR)
192   list(APPEND SRC
193     intern/radiance_hdr.c
194   )
195   add_definitions(-DWITH_HDR)
196 endif()
197
198 list(APPEND INC
199   ../../../intern/opencolorio
200 )
201
202 if(WIN32)
203   list(APPEND INC
204     ../../../intern/utfconv
205   )
206 endif()
207
208 # no need to compile object files for inline headers.
209 set_source_files_properties(
210   intern/colormanagement_inline.c
211   PROPERTIES HEADER_FILE_ONLY TRUE
212 )
213
214 blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")