cmake: apply ADD_SUBDIR patch.
[blender.git] / source / blender / blenkernel / CMakeLists.txt
1 # $Id$
2 # ***** BEGIN GPL LICENSE BLOCK *****
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17 #
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
20 #
21 # The Original Code is: all of this file.
22 #
23 # Contributor(s): Jacques Beaurain.
24 #
25 # ***** END GPL LICENSE BLOCK *****
26
27 FILE(GLOB SRC intern/*.c)
28
29 SET(INC 
30   . ../../../intern/guardedalloc ../include ../blenlib ../makesdna
31   ../python ../render/extern/include ../../../intern/decimation/extern
32   ../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
33   ../../../intern/iksolver/extern ../blenloader ../quicktime
34   ../../../intern/bmfont ../../../extern/bullet2/src
35   ../nodes ../../../extern/glew/include ../gpu
36   ${SDL_INC}
37   ${ZLIB_INC}
38   ${PYTHON_INC}
39 )
40
41 IF(WITH_VERSE)
42   ADD_DEFINITIONS(-DWITH_VERSE)
43   SET(INC ${INC} ${VERSE_INC})
44 ENDIF(WITH_VERSE)
45
46 IF(WITH_OPENEXR)
47   ADD_DEFINITIONS(-DWITH_OPENEXR)
48 ENDIF(WITH_OPENEXR)
49
50 IF(WITH_OPENJPEG)
51   ADD_DEFINITIONS(-DWITH_OPENJPEG)
52 ENDIF(WITH_OPENJPEG)
53
54 IF(WITH_DDS)
55   ADD_DEFINITIONS(-DWITH_DDS)
56 ENDIF(WITH_DDS)
57
58 IF(WITH_QUICKTIME)
59   SET(INC ${INC} ${QUICKTIME_INC})
60   ADD_DEFINITIONS(-DWITH_QUICKTIME)
61 ENDIF(WITH_QUICKTIME)
62
63 IF(WITH_FFMPEG)
64   SET(INC ${INC} ${FFMPEG_INC})
65   ADD_DEFINITIONS(-DWITH_FFMPEG)
66 ENDIF(WITH_FFMPEG)
67
68 IF(WITH_PLAYER)
69   ADD_SUBDIRECTORY(bad_level_call_stubs)
70 ENDIF(WITH_PLAYER)
71
72 BLENDERLIB(bf_blenkernel "${SRC}" "${INC}")
73
74 IF(WITH_VERSE)
75   ADD_DEPENDENCIES(bf_blenkernel mkprot verse)
76 ENDIF(WITH_VERSE)
77
78 IF(WITH_INTERNATIONAL)
79    ADD_DEFINITIONS(-DWITH_FREETYPE2)
80 ENDIF(WITH_INTERNATIONAL)
81
82 IF(NOT WITH_ELBEEM)
83   ADD_DEFINITIONS(-DDISABLE_ELBEEM)
84 ENDIF(NOT WITH_ELBEEM)