* add MSVC9 check for lib_vs2008. (CMake users, please verify. Provided by zebulon).
[blender.git] / 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 #-----------------------------------------------------------------------------
28 # We don't allow in-source builds. This causes no end of troubles because 
29 # all out-of-source builds will use the CMakeCache.txt file there and even 
30 # build the libs and objects in it. It will also conflict with the current 
31 # Makefile system for Blender
32
33 IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
34 MESSAGE(FATAL_ERROR "CMake generation for blender is not allowed within the source directory! 
35 Remove the CMakeCache.txt file and try again from another folder, e.g.: 
36
37    rm CMakeCache.txt 
38    cd ..
39    mkdir cmake-make 
40    cd cmake-make
41    cmake -G \"Unix Makefiles\" ../blender
42 ")
43 ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
44
45 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
46 PROJECT(Blender)
47
48 #-----------------------------------------------------------------------------
49 # Redirect output files
50
51 SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
52 SET(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib)
53
54 #-----------------------------------------------------------------------------
55 # Set default config options
56 OPTION(WITH_PLAYER              "Build Player"                                          OFF)
57 OPTION(WITH_GAMEENGINE          "Enable Game Engine"                                    ON)
58 OPTION(WITH_BULLET              "Enable Bullet (Physics Engine)"                        ON)
59 OPTION(WITH_INTERNATIONAL       "Enable I18N   (International fonts and text)"          ON)
60 OPTION(WITH_VERSE               "Enable Verse  (http://verse.blender.org)"              OFF)
61 OPTION(WITH_ELBEEM              "Enable Elbeem (Fluid Simulation)"                      ON)
62 OPTION(WITH_QUICKTIME           "Enable Quicktime Support"                              OFF)
63 OPTION(WITH_OPENEXR             "Enable OpenEXR Support (http://www.openexr.com)"       ON)
64 OPTION(WITH_FFMPEG              "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"   OFF)
65 OPTION(WITH_OPENAL              "Enable OpenAL Support (http://www.openal.org)"         ON)
66 OPTION(YESIAMSTUPID             "Enable execution on 64-bit platforms"                  OFF)
67 OPTION(WITH_OPENMP              "Enable OpenMP (has to be supported by the compiler)"   OFF)
68
69 IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
70   MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
71 ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
72
73 # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
74 # On Unix: 
75 #   cmake -D PYTHON_LIB=/usr/local/lib/python2.3/config/libpython2.3.so -D PYTHON_INC=/usr/local/include/python2.3 -D PYTHON_BINARY=/usr/local/bin/python2.3 -G "Unix Makefiles" ../blender
76 # On Macs: 
77 #   cmake -D PYTHON_INC=/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config -D PYTHON_BINARY=/System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 -G Xcode ../blender
78 #
79 # When changing any of this remember to update the notes in doc/blender-cmake.txt
80
81 #-----------------------------------------------------------------------------
82 # Load some macros.
83 INCLUDE(CMake/macros.cmake)
84
85 #-----------------------------------------------------------------------------
86 #Platform specifics
87
88 IF(UNIX)
89   INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake)
90   IF(OPENAL_FOUND)
91     SET(WITH_OPENAL ON)
92     SET(OPENAL_LIB ${OPENAL_LIBRARY})
93     SET(OPENAL_INC ${OPENAL_INCLUDE_DIR})
94   ELSE(OPENAL_FOUND)
95     SET(WITH_OPENAL OFF)
96   ENDIF(OPENAL_FOUND)
97
98   FIND_LIBRARY(ALUT_LIBRARY
99     NAMES alut
100     PATHS
101     /usr/local/lib
102     /usr/lib
103     /sw/lib
104     /opt/local/lib
105     /opt/csw/lib
106     /opt/lib
107   )
108   IF(ALUT_LIBRARY)
109     SET(OPENAL_LIB ${OPENAL_LIB} ${ALUT_LIBRARY})
110   ENDIF(ALUT_LIBRARY)
111
112   FIND_LIBRARY(INTL_LIBRARY
113     NAMES intl
114     PATHS
115     /usr/local/lib
116     /usr/lib
117     /sw/lib
118     /opt/local/lib
119     /opt/csw/lib
120     /opt/lib
121   )
122   FIND_LIBRARY(ICONV_LIBRARY
123     NAMES iconv
124     PATHS
125     /usr/local/lib
126     /usr/lib
127     /sw/lib
128     /opt/local/lib
129     /opt/csw/lib
130     /opt/lib
131   )
132   IF(INTL_LIBRARY AND ICONV_LIBRARY)
133     SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
134   ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
135   
136   FIND_PATH(FREETYPE_INC
137     freetype
138     PATHS
139     /usr/local/include/freetype2
140     /usr/include/freetype2
141     /sw/include/freetype2
142     /opt/local/include/freetype2
143     /opt/csw/include/freetype2
144     /opt/include/freetype2
145     NO_DEFAULT_PATH
146   )
147   SET(FREETYPE_LIB freetype)
148
149   INCLUDE(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
150   SET(PYTHON_INC "${PYTHON_INCLUDE_PATH}" CACHE STRING "")
151   SET(PYTHON_LIB "${PYTHON_LIBRARIES}" CACHE STRING "")
152   INCLUDE(${CMAKE_ROOT}/Modules/FindPythonInterp.cmake)
153   SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
154   SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
155
156   INCLUDE(${CMAKE_ROOT}/Modules/FindSDL.cmake)
157   SET(SDL_INC ${SDL_INCLUDE_DIR})
158   SET(SDL_LIB ${SDL_LIBRARY})
159
160   FIND_PATH(OPENEXR_INC
161     ImfXdr.h
162     PATHS
163     /usr/local/include/OpenEXR
164     /usr/include/OpenEXR
165     /sw/include/OpenEXR
166     /opt/local/include/OpenEXR
167     /opt/csw/include/OpenEXR
168     /opt/include/OpenEXR
169   )
170   SET(OPENEXR_LIB Half IlmImf Iex Imath)
171
172   SET(FFMPEG /usr)
173   SET(FFMPEG_INC ${FFMPEG}/include)
174   SET(FFMPEG_LIB avformat avcodec avutil)
175   SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
176
177   SET(JPEG_LIB jpeg)
178
179   SET(PNG_LIB png)
180
181   SET(ZLIB_LIB z)
182
183   SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++")
184
185   IF(WITH_OPENMP)
186     SET(LLIBS "${LLIBS} -lgomp ")
187     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
188     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
189   ENDIF(WITH_OPENMP)
190
191
192   SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts")
193
194   SET(PLATFORM_LINKFLAGS "-pthread")
195
196   INCLUDE_DIRECTORIES(/usr/include /usr/local/include)
197 ENDIF(UNIX)
198
199 IF(WIN32)
200   INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
201
202   SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
203
204   SET(PYTHON ${LIBDIR}/python)
205   SET(PYTHON_VERSION 2.5)
206   SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
207   SET(PYTHON_BINARY python)
208   SET(PYTHON_LIB python25)
209   SET(PYTHON_LIBPATH ${PYTHON}/lib)
210
211   #SET(WITH_OPENAL ON)
212   SET(OPENAL ${LIBDIR}/openal)
213   SET(OPENAL_INC ${OPENAL}/include ${OPENAL}/include/AL)
214   SET(OPENAL_LIB openal_static)
215   SET(OPENAL_LIBPATH ${OPENAL}/lib)
216
217   SET(PNG_LIB libpng_st)
218   SET(JPEG_LIB libjpeg)
219
220   SET(ZLIB ${LIBDIR}/zlib)
221   SET(ZLIB_INC ${ZLIB}/include)
222   SET(ZLIB_LIB libz)
223   SET(ZLIB_LIBPATH ${ZLIB}/lib)
224   
225   SET(PTHREADS ${LIBDIR}/pthreads)
226   SET(PTHREADS_INC ${PTHREADS}/include)
227   SET(PTHREADS_LIB pthreadVC2)
228   SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
229   
230   SET(ICONV ${LIBDIR}/iconv)
231   SET(ICONV_INC ${ICONV}/include)
232   SET(ICONV_LIB iconv)
233   SET(ICONV_LIBPATH ${ICONV}/lib)
234   
235   SET(GETTEXT ${LIBDIR}/gettext)
236   SET(GETTEXT_INC ${GETTEXT}/include)
237   SET(GETTEXT_LIB gnu_gettext)
238   SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
239
240   SET(FREETYPE ${LIBDIR}/freetype)
241   SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2)
242   SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
243   SET(FREETYPE_LIB freetype2ST)
244   
245   SET(OPENEXR ${LIBDIR}/openexr)
246   SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
247   SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
248   IF (MSVC80)
249   SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
250   ELSE (MSVC80)
251   SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
252   ENDIF(MSVC80)
253   IF (MSVC90)
254   SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
255   ENDIF(MSVC90)
256
257   
258   SET(QUICKTIME ${LIBDIR}/QTDevWin)
259   SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
260   SET(QUICKTIME_LIB qtmlClient)
261   SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
262
263   SET(FFMPEG ${LIBDIR}/ffmpeg)
264   SET(FFMPEG_INC ${FFMPEG}/include)
265   SET(FFMPEG_LIB avcodec-51 avformat-52 avdevice-52 avutil-49 swscale-0)
266   SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
267
268   SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
269   IF(WITH_OPENAL)
270     SET(LLIBS ${LLIBS} dxguid)
271   ENDIF(WITH_OPENAL)
272
273   SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
274   SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
275   SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
276   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
277   SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
278   SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
279   SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
280   SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
281
282   IF(WITH_OPENMP)
283     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
284     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
285   ENDIF(WITH_OPENMP)
286
287   SET(SDL ${LIBDIR}/sdl)
288   SET(SDL_INC ${SDL}/include)
289   SET(SDL_LIB SDL)
290   SET(SDL_LIBPATH ${SDL}/lib)
291
292   SET(PNG "${LIBDIR}/png")
293   SET(PNG_INC "${PNG}/include")
294   SET(PNG_LIBPATH ${PNG}/lib)
295
296   SET(JPEG "${LIBDIR}/jpeg")
297   SET(JPEG_INC "${JPEG}/include")
298   SET(JPEG_LIBPATH ${JPEG}/lib)
299
300   SET(TIFF ${LIBDIR}/tiff)
301   SET(TIFF_INC ${TIFF}/include)
302   
303   SET(WINTAB_INC ${LIBDIR}/wintab/include) 
304
305   SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib")
306   SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
307 ENDIF(WIN32)
308
309 IF(APPLE)
310   IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
311     SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
312   ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
313     SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc)
314   ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
315
316   INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake)
317   IF(OPENAL_FOUND)
318     SET(WITH_OPENAL ON)
319     SET(OPENAL_LIB ${OPENAL_LIBRARY})
320     SET(OPENAL_INC ${OPENAL_INCLUDE_DIR})
321   ELSE(OPENAL_FOUND)
322     SET(WITH_OPENAL OFF)
323   ENDIF(OPENAL_FOUND)
324
325   SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
326   SET(PYTHON_VERSION 2.3)
327   SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
328   SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "")
329   SET(PYTHON_LIB "")
330   SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
331   SET(PYTHON_LINKFLAGS "-u __dummy -u _PyMac_Error -framework System -framework Python")
332
333   SET(GETTEXT ${LIBDIR}/gettext)
334   SET(GETTEXT_INC "${GETTEXT}/include")
335   SET(GETTEXT_LIB intl iconv)
336   SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
337
338   SET(PNG_LIB png)
339   SET(JPEG_LIB jpeg)
340
341   SET(ZLIB /usr)
342   SET(ZLIB_INC "${ZLIB}/include")
343   SET(ZLIB_LIB z)
344
345   SET(FREETYPE ${LIBDIR}/freetype)
346   SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2)
347   SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
348   SET(FREETYPE_LIB freetype)
349
350   SET(OPENEXR ${LIBDIR}/openexr)
351   SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
352   IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
353     SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
354   ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
355     SET(OPENEXR_LIB Iex Half IlmImf Imath)
356   ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
357   SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
358
359   SET(LLIBS stdc++ SystemStubs)
360
361   SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
362   SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
363
364   IF(WITH_OPENMP)
365     SET(LLIBS "${LLIBS} -lgomp ")
366     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
367     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
368   ENDIF(WITH_OPENMP)
369
370   SET(SDL ${LIBDIR}/sdl)
371   SET(SDL_INC ${SDL}/include)
372   SET(SDL_LIB SDL)
373   SET(SDL_LIBPATH ${SDL}/lib)
374
375   SET(PNG "${LIBDIR}/png")
376   SET(PNG_INC "${PNG}/include")
377   SET(PNG_LIBPATH ${PNG}/lib)
378
379   SET(JPEG "${LIBDIR}/jpeg")
380   SET(JPEG_INC "${JPEG}/include")
381   SET(JPEG_LIBPATH ${JPEG}/lib)
382
383   SET(TIFF ${LIBDIR}/tiff)
384   SET(TIFF_INC ${TIFF}/include)
385
386   SET(EXETYPE MACOSX_BUNDLE)
387 ENDIF(APPLE)
388
389 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
390   SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
391   SET(BINRELOC_INC ${BINRELOC}/include)
392 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
393
394 #-----------------------------------------------------------------------------
395 # Common.
396 SET(VERSE_INC ${CMAKE_SOURCE_DIR}/extern/verse/dist)
397
398 SET(FTGL ${CMAKE_SOURCE_DIR}/extern/bFTGL)
399 SET(FTGL_INC ${FTGL}/include)
400 SET(FTGL_LIB extern_ftgl)
401
402
403 #-----------------------------------------------------------------------------
404 # Configure OpenGL.
405 INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
406 INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
407 #-----------------------------------------------------------------------------
408 # Extra compile flags
409 IF(WITH_GAMEENGINE)
410   SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DGAMEBLENDER ")
411 ENDIF(WITH_GAMEENGINE)
412 IF(WITH_BULLET)
413   SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DWITH_BULLET ")
414 ENDIF(WITH_BULLET)
415 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ")
416 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ")
417
418 #-----------------------------------------------------------------------------
419 # Libraries
420 FILE(WRITE ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "")
421 SUBDIRS(
422   intern
423   extern
424   source
425 )
426
427
428 #-----------------------------------------------------------------------------
429 # Blender Application
430 SUBDIRS(source/creator)
431
432 #-----------------------------------------------------------------------------
433 # Blender Player
434 IF(WITH_PLAYER)
435   SUBDIRS(blenderplayer)
436 ENDIF(WITH_PLAYER)