Cleanup: remove contributors for CMake files
[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         ../makesdna
27         ../makesrna
28         ../../../intern/guardedalloc
29         ../../../intern/memutil
30 )
31
32 set(INC_SYS
33         ${JPEG_INCLUDE_DIR}
34         ${PNG_INCLUDE_DIRS}
35         ${ZLIB_INCLUDE_DIRS}
36 )
37
38 set(SRC
39         intern/allocimbuf.c
40         intern/anim_movie.c
41         intern/bmp.c
42         intern/cache.c
43         intern/colormanagement.c
44         intern/colormanagement_inline.c
45         intern/divers.c
46         intern/filetype.c
47         intern/filter.c
48         intern/imageprocess.c
49         intern/indexer.c
50         intern/iris.c
51         intern/jpeg.c
52         intern/metadata.c
53         intern/module.c
54         intern/moviecache.c
55         intern/png.c
56         intern/readimage.c
57         intern/rectop.c
58         intern/rotate.c
59         intern/scaling.c
60         intern/stereoimbuf.c
61         intern/targa.c
62         intern/thumbs.c
63         intern/thumbs_blend.c
64         intern/thumbs_font.c
65         intern/util.c
66         intern/writeimage.c
67
68         IMB_colormanagement.h
69         IMB_imbuf.h
70         IMB_imbuf_types.h
71         IMB_metadata.h
72         IMB_moviecache.h
73         IMB_thumbs.h
74         intern/IMB_allocimbuf.h
75         intern/IMB_anim.h
76         intern/IMB_colormanagement_intern.h
77         intern/IMB_filetype.h
78         intern/IMB_filter.h
79         intern/IMB_indexer.h
80         intern/imbuf.h
81
82         # orphan include
83         ../../../intern/ffmpeg/ffmpeg_compat.h
84 )
85
86 if(WITH_IMAGE_OPENEXR)
87         add_definitions(-DWITH_OPENEXR)
88 else()
89         list(APPEND SRC
90                 intern/openexr/openexr_stub.cpp
91         )
92 endif()
93
94 if(WITH_IMAGE_TIFF)
95         list(APPEND INC_SYS
96                 ${TIFF_INCLUDE_DIR}
97         )
98         list(APPEND SRC
99                 intern/tiff.c
100         )
101
102         add_definitions(-DWITH_TIFF)
103 endif()
104
105
106 if(WITH_OPENIMAGEIO)
107         add_definitions(-DWITH_OPENIMAGEIO)
108 endif()
109
110 if(WITH_IMAGE_OPENJPEG)
111         list(APPEND INC_SYS
112                 ${OPENJPEG_INCLUDE_DIRS}
113         )
114         list(APPEND SRC
115                 intern/jp2.c
116         )
117
118         add_definitions(-DWITH_OPENJPEG ${OPENJPEG_DEFINES})
119 endif()
120
121 if(WITH_CODEC_AVI)
122         list(APPEND INC
123                 ../avi
124         )
125         add_definitions(-DWITH_AVI)
126 endif()
127
128 if(WITH_CODEC_FFMPEG)
129         list(APPEND INC
130                 ../../../intern/ffmpeg
131         )
132         list(APPEND INC_SYS
133                 ${FFMPEG_INCLUDE_DIRS}
134         )
135         add_definitions(-DWITH_FFMPEG)
136
137         remove_strict_c_flags_file(
138                 intern/anim_movie.c
139                 intern/indexer.c
140                 intern/util.c
141         )
142 endif()
143
144 if(WITH_IMAGE_DDS)
145         add_definitions(-DWITH_DDS)
146 endif()
147
148 if(WITH_IMAGE_CINEON)
149         add_definitions(-DWITH_CINEON)
150 endif()
151
152 if(WITH_IMAGE_HDR)
153         list(APPEND SRC
154                 intern/radiance_hdr.c
155         )
156         add_definitions(-DWITH_HDR)
157 endif()
158
159 list(APPEND INC
160         ../../../intern/opencolorio
161 )
162
163 if(WIN32)
164         list(APPEND INC
165                 ../../../intern/utfconv
166         )
167 endif()
168
169 # no need to compile object files for inline headers.
170 set_source_files_properties(
171         intern/colormanagement_inline.c
172         PROPERTIES HEADER_FILE_ONLY TRUE
173 )
174
175 blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")