[#21842] Beta patch to restore cmake MinGW compilation
[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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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.6)
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 # Note! - Could create this from the blender version string
55 # ...but thats quite involved, make sure this matches the blender version.
56 SET(BLENDER_VERSION  2.5)
57
58 #-----------------------------------------------------------------------------
59 # Set default config options
60 OPTION(WITH_PLAYER        "Build Player" OFF)
61 OPTION(WITH_GAMEENGINE    "Enable Game Engine" ON)
62 OPTION(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
63 OPTION(WITH_INTERNATIONAL "Enable I18N   (International fonts and text)" ON)
64 OPTION(WITH_ELBEEM        "Enable Elbeem (Fluid Simulation)" ON)
65 OPTION(WITH_OPENEXR       "Enable OpenEXR Support (http://www.openexr.com)" ON)
66 OPTION(WITH_TIFF          "Enable LibTIFF Support" ON)
67 OPTION(WITH_DDS           "Enable DDS Support" ON)
68 OPTION(WITH_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
69 OPTION(WITH_PYTHON        "Enable Embedded Python API" ON)
70 OPTION(WITH_SDL           "Enable SDL for sound and joystick support" ON)
71 OPTION(WITH_OPENJPEG      "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
72 OPTION(WITH_OPENAL        "Enable OpenAL Support (http://www.openal.org)" ON)
73 OPTION(WITH_WEBPLUGIN     "Enable Web Plugin (Unix only)" OFF)
74 OPTION(WITH_FFTW3         "Enable FFTW3 support" OFF)
75 OPTION(WITH_JACK          "Enable Jack Support (http://www.jackaudio.org)" OFF)
76 OPTION(WITH_SNDFILE       "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
77 OPTION(WITH_LZO           "Enable fast LZO compression, used for pointcache" ON)
78 OPTION(WITH_LZMA          "Enable best LZMA compression, used for pointcache" ON)
79 OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF)
80 OPTION(WITH_BUILDINFO     "Include extra build details" ON)
81 OPTION(WITH_INSTALL       "Install accompanying scripts and language files needed to run blender" ON)
82 OPTION(WITH_RAYOPTIMIZATION     "Enable use of SIMD (SSE) optimizations for the raytracer" OFF) 
83
84 IF(APPLE OR WIN32)
85         OPTION(WITH_QUICKTIME     "Enable Quicktime Support" OFF)
86 ENDIF(APPLE OR WIN32)
87
88 # Unix defaults to OpenMP On
89 # Disable opencollada on non-apple unix because opencollada has no package for debian
90 IF(UNIX AND NOT APPLE)
91         OPTION(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
92         OPTION(WITH_OPENCOLLADA         "Enable OpenCollada Support (http://www.opencollada.org/)"      OFF)
93 ELSE()
94         OPTION(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" OFF)
95         OPTION(WITH_OPENCOLLADA         "Enable OpenCollada Support (http://www.opencollada.org/)"      OFF)
96 ENDIF()
97
98 IF (APPLE)
99         OPTION(WITH_COCOA         "Use Cocoa framework instead of deprecated Carbon" ON)
100         OPTION(USE_QTKIT          "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
101         OPTION(WITH_LIBS10.5  "Use 10.5 libs (needed for 64bit builds)" OFF)
102 ENDIF (APPLE)
103
104 IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
105         MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
106 ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
107
108 # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
109 # On Unix: 
110 #   cmake -D PYTHON_LIB=/usr/local/lib/python3.1/config/libpython3.1.so -D PYTHON_INC=/usr/local/include/python3.1 -G "Unix Makefiles" ../blender
111 # On Macs: 
112 #   cmake -D PYTHON_INC=/System/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1 -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/config -G Xcode ../blender
113 #
114 # When changing any of this remember to update the notes in doc/blender-cmake.txt
115
116 #-----------------------------------------------------------------------------
117 # Load some macros.
118 INCLUDE(CMake/macros.cmake)
119
120 #-----------------------------------------------------------------------------
121 #Platform specifics
122
123 IF(UNIX AND NOT APPLE)
124
125
126         IF(WITH_OPENAL)
127                 FIND_PACKAGE(OpenAL)
128                 IF(NOT OPENAL_FOUND)
129                         SET(WITH_OPENAL OFF)
130                 ENDIF(NOT OPENAL_FOUND)
131         ENDIF(WITH_OPENAL)
132
133         IF(WITH_JACK)
134                 SET(JACK /usr)
135                 SET(JACK_INC ${JACK}/include/jack)
136                 SET(JACK_LIB jack)
137                 SET(JACK_LIBPATH ${JACK}/lib)
138         ENDIF(WITH_JACK)
139
140         IF(WITH_SNDFILE)
141         SET(SNDFILE /usr)
142         SET(SNDFILE_INC ${SNDFILE}/include)
143         SET(SNDFILE_LIB sndfile)
144         SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
145         ENDIF(WITH_SNDFILE)
146
147         FIND_LIBRARY(INTL_LIBRARY
148                 NAMES intl
149                 PATHS
150                 /sw/lib
151         )
152         FIND_LIBRARY(ICONV_LIBRARY
153                 NAMES iconv
154                 PATHS
155                 /sw/lib
156         )
157   
158         IF(INTL_LIBRARY AND ICONV_LIBRARY)
159                 SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
160         ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
161
162         FIND_PACKAGE(Freetype)
163         # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
164
165         # No way to set py31. remove for now.
166         # FIND_PACKAGE(PythonLibs)
167         SET(PYTHON /usr)
168         SET(PYTHON_VERSION 3.1)
169         SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
170         # SET(PYTHON_BINARY python) # not used yet
171         SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
172         SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
173   
174         # FIND_PACKAGE(PythonInterp) # not used yet
175         # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
176   
177         SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
178
179         IF(WITH_SDL)
180                 FIND_PACKAGE(SDL)
181                 # UNSET(SDLMAIN_LIBRARY CACHE)
182                 IF(NOT SDL_FOUND)
183                         SET(WITH_SDL OFF)
184                 ENDIF(NOT SDL_FOUND)
185         ENDIF(WITH_SDL)
186
187         SET(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
188         FIND_PATH(OPENEXR_INC
189                 ImfXdr.h
190                 PATHS
191                 ${OPENEXR}/include/OpenEXR
192                 /usr/local/include/OpenEXR
193                 /sw/include/OpenEXR
194                 /opt/local/include/OpenEXR
195                 /opt/csw/include/OpenEXR
196                 /opt/include/OpenEXR
197         )
198         SET(OPENEXR_LIB Half IlmImf Iex Imath)
199
200         SET(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory")
201         SET(FFMPEG_INC ${FFMPEG}/include)
202         SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
203         SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
204   
205         IF(WITH_FFTW3)
206                 SET(FFTW3 /usr)
207                 SET(FFTW3_INC ${FFTW3}/include)
208                 SET(FFTW3_LIB fftw3)
209                 SET(FFTW3_LIBPATH ${FFTW3}/lib)
210         ENDIF(WITH_FFTW3)
211
212         SET(LIBSAMPLERATE /usr)
213         SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
214         SET(LIBSAMPLERATE_LIB samplerate)
215         SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
216
217         IF(WITH_TIFF)
218                 FIND_PACKAGE(TIFF)
219                 IF(NOT TIFF_FOUND)
220                         SET(WITH_TIFF OFF)
221                 ENDIF(NOT TIFF_FOUND)
222         ENDIF(WITH_TIFF)
223
224         FIND_PACKAGE(JPEG REQUIRED)
225
226         FIND_PACKAGE(PNG REQUIRED)
227
228         FIND_PACKAGE(ZLIB REQUIRED)
229
230         IF (WITH_OPENCOLLADA)
231                 SET(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
232                 SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
233                 SET(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer)
234                 SET(OPENCOLLADA_INC ${OPENCOLLADA})
235                 SET(PCRE /usr CACHE FILEPATH "PCRE Directory")
236                 SET(PCRE_LIBPATH ${PCRE}/lib)
237                 SET(PCRE_LIB pcre)
238                 SET(EXPAT /usr CACHE FILEPATH "Expat Directory")
239                 SET(EXPAT_LIBPATH ${EXPAT}/lib)
240                 SET(EXPAT_LIB expat)
241         ENDIF (WITH_OPENCOLLADA)
242
243
244         # Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
245         SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
246
247         IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
248                 # BSD's dont use libdl.so
249                 SET(LLIBS "${LLIBS} -ldl")
250         ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
251
252         IF(WITH_OPENMP)
253                 SET(LLIBS "${LLIBS} -lgomp")
254                 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
255                 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
256         ENDIF(WITH_OPENMP)
257
258
259         SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -Wno-char-subscripts")
260
261         SET(PLATFORM_LINKFLAGS "-pthread")
262
263         # Better warnings
264         SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
265         SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
266
267         INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
268 ENDIF(UNIX AND NOT APPLE)
269
270 IF(WIN32)
271
272         # this file is included anyway when building under Windows with cl.exe
273         #  INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
274   
275         SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
276
277         # Setup 64bit and 64bit windows systems
278         IF(CMAKE_CL_64)
279                 message("64 bit compiler detected.")
280                 SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
281         ENDIF(CMAKE_CL_64)
282
283         SET(PYTHON ${LIBDIR}/python)
284         SET(PYTHON_VERSION 3.1)
285         SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
286         # SET(PYTHON_BINARY python) # not used yet
287         SET(PYTHON_LIB python31)
288         SET(PYTHON_LIBPATH ${PYTHON}/lib)
289
290         IF(WITH_OPENAL)
291                 SET(OPENAL ${LIBDIR}/openal)
292                 SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
293                 SET(OPENAL_LIBRARY wrap_oal)
294                 SET(OPENAL_LIBPATH ${OPENAL}/lib)
295         ENDIF(WITH_OPENAL)
296
297         IF(WITH_SNDFILE)
298                 SET(SNDFILE ${LIBDIR}/sndfile)
299                 SET(SNDFILE_INC ${SNDFILE}/include)
300                 SET(SNDFILE_LIB libsndfile-1)
301                 SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
302         ENDIF(WITH_SNDFILE)
303   
304         SET(ICONV ${LIBDIR}/iconv)
305         SET(ICONV_INC ${ICONV}/include)
306         SET(ICONV_LIB iconv)
307         SET(ICONV_LIBPATH ${ICONV}/lib)
308
309         SET(QUICKTIME ${LIBDIR}/QTDevWin)
310         SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
311         SET(QUICKTIME_LIB qtmlClient)
312         SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
313
314         SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
315         SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
316         SET(LIBSAMPLERATE_LIB libsamplerate)
317         SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
318
319         SET(SDL ${LIBDIR}/sdl)
320         SET(SDL_INCLUDE_DIR ${SDL}/include)
321         SET(SDL_LIBRARY SDL)
322         SET(SDL_LIBPATH ${SDL}/lib)
323
324         SET(PNG "${LIBDIR}/png")
325         SET(PNG_INC "${PNG}/include")
326         SET(PNG_LIBPATH ${PNG}/lib)
327
328         SET(JPEG "${LIBDIR}/jpeg")
329         SET(JPEG_INC "${JPEG}/include")
330         SET(JPEG_LIBPATH ${JPEG}/lib)
331
332         SET(WINTAB_INC ${LIBDIR}/wintab/include) 
333
334         IF(MSVC)
335                 IF(CMAKE_CL_64)
336                         SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
337                 ELSE(CMAKE_CL_64)
338                         SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
339                 ENDIF(CMAKE_CL_64)
340                 
341                 SET(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305" CACHE STRING "MSVC MT C++ flags " FORCE)
342                 SET(CMAKE_C_FLAGS   "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305" CACHE STRING "MSVC MT C++ flags " FORCE)
343
344                 SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
345                 SET(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
346                 SET(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
347                 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
348                 SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
349                 SET(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
350                 SET(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
351                 SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
352                 
353                 IF(WITH_OPENMP)
354                         SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
355                         SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
356                 ENDIF(WITH_OPENMP)
357                 
358                 SET(GETTEXT ${LIBDIR}/gettext)
359                 SET(GETTEXT_INC ${GETTEXT}/include)
360                 SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
361                 IF(CMAKE_CL_64)
362                         SET(GETTEXT_LIB gettext)
363                 ELSE(CMAKE_CL_64)
364                         SET(GETTEXT_LIB gnu_gettext)
365                 ENDIF(CMAKE_CL_64)
366
367                 IF(CMAKE_CL_64)
368                         SET(PNG_LIBRARIES libpng)
369                 ELSE(CMAKE_CL_64)
370                         SET(PNG_LIBRARIES libpng_st)
371                 ENDIF(CMAKE_CL_64)
372                 SET(JPEG_LIBRARY libjpeg)
373
374                 SET(ZLIB ${LIBDIR}/zlib)
375                 SET(ZLIB_INC ${ZLIB}/include)
376                 SET(ZLIB_LIBPATH ${ZLIB}/lib)
377                 IF(CMAKE_CL_64)
378                         SET(ZLIB_LIBRARIES libz)
379                 ELSE(CMAKE_CL_64)
380                         SET(ZLIB_LIBRARIES zlib)
381                 ENDIF(CMAKE_CL_64)
382
383                 SET(PTHREADS ${LIBDIR}/pthreads)
384                 SET(PTHREADS_INC ${PTHREADS}/include)
385                 SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
386                 SET(PTHREADS_LIB pthreadVC2)
387                 
388                 SET(FREETYPE ${LIBDIR}/freetype)
389                 SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
390                 SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
391                 SET(FREETYPE_LIBRARY freetype2ST)
392
393                 IF(WITH_FFTW3)
394                         SET(FFTW3 ${LIBDIR}/fftw3)
395                         SET(FFTW3_LIB libfftw)
396                         SET(FFTW3_INC ${FFTW3}/include)
397                         SET(FFTW3_LIBPATH ${FFTW3}/lib)
398                 ENDIF(WITH_FFTW3)
399
400                 IF(WITH_OPENCOLLADA)
401                         SET(OPENCOLLADA ${LIBDIR}/opencollada)
402                         SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
403                         SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
404                         SET(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 buffer ftoa)
405                         #pcre is bundled with openCollada
406                         #SET(PCRE ${LIBDIR}/pcre)
407                         #SET(PCRE_LIBPATH ${PCRE}/lib)
408                         SET(PCRE_LIB pcre)
409                 ENDIF(WITH_OPENCOLLADA)
410                 
411                 IF(WITH_FFMPEG)
412                         SET(FFMPEG ${LIBDIR}/ffmpeg)
413                         SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
414                         SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
415                         SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
416                 ENDIF(WITH_FFMPEG)
417
418                 IF(WITH_OPENEXR)
419                         SET(OPENEXR ${LIBDIR}/openexr)
420                         SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
421                         SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
422                         IF (MSVC80)
423                                 SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
424                         ELSE (MSVC80)
425                                 SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
426                         ENDIF(MSVC80)
427                         IF (MSVC90)
428                                 SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
429                         ENDIF(MSVC90)
430                 ENDIF(WITH_OPENEXR)
431
432                 IF(WITH_TIFF)
433                         SET(TIFF ${LIBDIR}/tiff)
434                         SET(TIFF_LIBRARY libtiff)
435                         SET(TIFF_INCLUDE_DIR ${TIFF}/include)
436                         SET(TIFF_LIBPATH ${TIFF}/lib)
437                 ENDIF(WITH_TIFF)
438
439                 IF(WITH_JACK)
440                         SET(JACK ${LIBDIR}/jack)
441                         SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
442                         SET(JACK_LIB libjack)
443                         SET(JACK_LIBPATH ${JACK}/lib)
444                 ENDIF(WITH_JACK)
445
446                 # MSVC only, Mingw doesnt need
447                 IF(CMAKE_CL_64)
448                         SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
449                 ELSE(CMAKE_CL_64)
450                         SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
451                 ENDIF(CMAKE_CL_64)
452           
453                 SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
454
455         ELSE(MSVC) # MINGW
456                 SET(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
457
458                 SET(CMAKE_CXX_FLAGS                "-pipe -funsigned-char -fno-strict-aliasing -mwindows" CACHE STRING "Mingw C++ flags " FORCE)
459                 SET(CMAKE_C_FLAGS                  "-pipe -funsigned-char -fno-strict-aliasing" CACHE STRING "Mingw C flags " FORCE)
460
461                 SET(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g" CACHE STRING "Mingw debug C++ flags " FORCE)
462                 SET(CMAKE_CXX_FLAGS_RELEASE        "   -O2" CACHE STRING "Mingw release C++ flags " FORCE)
463                 SET(CMAKE_CXX_FLAGS_MINSIZEREL     "   -Os" CACHE STRING "Mingw minsize release C++ flags " FORCE)
464                 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Mingw release, debug C++ flags " FORCE)
465
466                 SET(CMAKE_C_FLAGS_DEBUG            "-O0 -g" CACHE STRING "Mingw debug C flags " FORCE)
467                 SET(CMAKE_C_FLAGS_RELEASE          "-O2"    CACHE STRING "Mingw release C flags " FORCE)
468                 SET(CMAKE_C_FLAGS_MINSIZEREL       "-Os"    CACHE STRING "Mingw minsize release C flags " FORCE)
469                 SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g" CACHE STRING "Mingw release, debug C++ flags " FORCE)
470                 ADD_DEFINITIONS(-DFREE_WINDOWS -DWIN32)
471                 
472                 IF(WITH_OPENMP)
473                         SET(LLIBS "${LLIBS} -lgomp")
474                         SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
475                         SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
476                 ENDIF(WITH_OPENMP)
477
478                 SET(GETTEXT ${LIBDIR}/gcc/gettext)
479                 SET(GETTEXT_INC ${GETTEXT}/include)
480                 SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
481                 SET(GETTEXT_LIB intl)
482
483                 SET(JPEG_LIBRARY jpeg)
484                 SET(PNG_LIBRARIES png)
485
486                 SET(ZLIB ${LIBDIR}/zlib)
487                 SET(ZLIB_INC ${ZLIB}/include)
488                 SET(ZLIB_LIBPATH ${ZLIB}/lib)
489                 SET(ZLIB_LIBRARIES z)
490
491                 SET(PTHREADS ${LIBDIR}/pthreads)
492                 SET(PTHREADS_INC ${PTHREADS}/include)
493                 SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
494                 SET(PTHREADS_LIB pthreadGC2)
495                 
496                 SET(FREETYPE ${LIBDIR}/gcc/freetype)
497                 SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
498                 SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
499                 SET(FREETYPE_LIBRARY freetype)
500
501                 IF(WITH_FFTW3)
502                         SET(FFTW3 ${LIBDIR}/gcc/fftw3)
503                         SET(FFTW3_LIB fftw3)
504                         SET(FFTW3_INC ${FFTW3}/include)
505                         SET(FFTW3_LIBPATH ${FFTW3}/lib)
506                 ENDIF(WITH_FFTW3)
507
508                 IF(WITH_OPENCOLLADA)
509                         SET(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
510                         SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
511                         SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
512                         SET(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
513                         #pcre is bundled with openCollada
514                         #SET(PCRE ${LIBDIR}/pcre)
515                         #SET(PCRE_LIBPATH ${PCRE}/lib)
516                         SET(PCRE_LIB pcre)
517                 ENDIF(WITH_OPENCOLLADA)
518                 
519                 IF(WITH_FFMPEG)
520                         # TODO
521                         SET(WITH_FFMPEG OFF)
522                 ENDIF(WITH_FFMPEG)
523
524                 IF(WITH_OPENEXR)
525                         SET(OPENEXR ${LIBDIR}/gcc/openexr)
526                         SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
527                         SET(OPENEXR_LIB Half IlmImf Iex)
528                         SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
529                 ENDIF(WITH_OPENEXR)
530
531                 IF(WITH_TIFF)
532                         SET(TIFF ${LIBDIR}/gcc/tiff)
533                         SET(TIFF_LIBRARY tiff)
534                         SET(TIFF_INCLUDE_DIR ${TIFF}/include)
535                         SET(TIFF_LIBPATH ${TIFF}/lib)
536                 ENDIF(WITH_TIFF)
537
538                 IF(WITH_JACK)
539                         SET(JACK ${LIBDIR}/jack)
540                         SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
541                         SET(JACK_LIB jack)
542                         SET(JACK_LIBPATH ${JACK}/lib)
543                         
544                         # TODO, gives linking errors, force off
545                         SET(WITH_JACK OFF)
546                 ENDIF(WITH_JACK)
547
548         ENDIF(MSVC)
549
550 ENDIF(WIN32)
551
552 IF(APPLE)
553         IF(WITH_LIBS10.5)
554                 SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
555         ELSE(WITH_LIBS10.5)
556                 IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
557                         SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
558                 ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
559                         SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.0.0-powerpc)
560                 ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
561         ENDIF(WITH_LIBS10.5)
562         
563
564         IF(WITH_OPENAL)
565                 FIND_PACKAGE(OpenAL)
566                 IF(OPENAL_FOUND)
567                         SET(WITH_OPENAL ON)
568                         SET(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include")
569                 ELSE(OPENAL_FOUND)
570                         SET(WITH_OPENAL OFF)
571                 ENDIF(OPENAL_FOUND)
572         ENDIF(WITH_OPENAL)
573
574         IF(WITH_JACK)
575                 SET(JACK /usr)
576                 SET(JACK_INC ${JACK}/include/jack)
577                 SET(JACK_LIB jack)
578                 SET(JACK_LIBPATH ${JACK}/lib)
579         ENDIF(WITH_JACK)
580
581         IF(WITH_SNDFILE)
582                 SET(SNDFILE ${LIBDIR}/sndfile)
583                 SET(SNDFILE_INC ${SNDFILE}/include)
584                 SET(SNDFILE_LIB sndfile FLAC ogg vorbis vorbisenc)
585                 SET(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)
586         ENDIF(WITH_SNDFILE)
587
588         SET(PYTHON_VERSION 3.1)
589
590         IF(PYTHON_VERSION MATCHES 3.1)
591                 # we use precompiled libraries for py 3.1 and up by default
592
593                 SET(PYTHON ${LIBDIR}/python)
594                 SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
595                 # SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # not used yet
596                 SET(PYTHON_LIB python${PYTHON_VERSION})
597                 SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}")
598                 # SET(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
599         ELSE(PYTHON_VERSION MATCHES 3.1)
600                 # otherwise, use custom system framework
601
602                 SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
603                 SET(PYTHON_VERSION 3.1)
604                 SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}")
605                 # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
606                 SET(PYTHON_LIB "")
607                 SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config)
608                 SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
609         ENDIF(PYTHON_VERSION MATCHES 3.1)
610
611         SET(GETTEXT ${LIBDIR}/gettext)
612         SET(GETTEXT_INC "${GETTEXT}/include")
613         SET(GETTEXT_LIB intl iconv)
614         SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
615   
616         IF(WITH_FFTW3)
617                 SET(FFTW3 ${LIBDIR}/fftw3)
618                 SET(FFTW3_INC ${FFTW3}/include)
619                 SET(FFTW3_LIB fftw3)
620                 SET(FFTW3_LIBPATH ${FFTW3}/lib)
621         ENDIF(WITH_FFTW3)
622
623         SET(PNG_LIBRARIES png)
624         SET(JPEG_LIBRARY jpeg)
625
626         SET(ZLIB /usr)
627         SET(ZLIB_INC "${ZLIB}/include")
628         SET(ZLIB_LIBRARIES z bz2)
629
630         SET(FREETYPE ${LIBDIR}/freetype)
631         SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
632         SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
633         SET(FREETYPE_LIBRARY freetype)
634
635         SET(OPENEXR ${LIBDIR}/openexr)
636         SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
637         SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
638         SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
639
640         SET(FFMPEG ${LIBDIR}/ffmpeg)
641         SET(FFMPEG_INC ${FFMPEG}/include)
642         SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
643         SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
644
645         SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
646         SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
647         SET(LIBSAMPLERATE_LIB samplerate)
648         SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
649
650         SET(LLIBS stdc++ SystemStubs)
651
652         IF (WITH_COCOA)
653                 SET(PLATFORM_CFLAGS "-pipe -funsigned-char -DGHOST_COCOA")
654                 SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio")
655                 IF(USE_QTKIT)
656                         SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DUSE_QTKIT")
657                         SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit")
658                         IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
659                                 SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
660                                 #libSDL still needs 32bit carbon quicktime 
661                         ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
662                 ELSEIF(WITH_QUICKTIME)
663                         SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
664                 ENDIF(USE_QTKIT)
665         ELSE (WITH_COCOA)
666                 SET(PLATFORM_CFLAGS "-pipe -funsigned-char")
667                 SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
668         ENDIF (WITH_COCOA)
669
670         IF(WITH_OPENMP)
671                 SET(LLIBS "${LLIBS} -lgomp")
672                 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
673                 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
674         ENDIF(WITH_OPENMP)
675
676         IF (WITH_OPENCOLLADA)
677                 SET(OPENCOLLADA ${LIBDIR}/opencollada)
678                 SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
679                 SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
680                 SET(OPENCOLLADA_LIB "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
681                 #pcre is bundled with openCollada
682                 #SET(PCRE ${LIBDIR}/pcre)
683                 #SET(PCRE_LIBPATH ${PCRE}/lib)
684                 SET(PCRE_LIB pcre)
685                 #libxml2 is used
686                 #SET(EXPAT ${LIBDIR}/expat)
687                 #SET(EXPAT_LIBPATH ${EXPAT}/lib)
688                 SET(EXPAT_LIB)
689         ENDIF (WITH_OPENCOLLADA)
690
691         SET(SDL ${LIBDIR}/sdl)
692         SET(SDL_INCLUDE_DIR ${SDL}/include)
693         SET(SDL_LIBRARY SDL)
694         SET(SDL_LIBPATH ${SDL}/lib)
695
696         SET(PNG "${LIBDIR}/png")
697         SET(PNG_INC "${PNG}/include")
698         SET(PNG_LIBPATH ${PNG}/lib)
699
700         SET(JPEG "${LIBDIR}/jpeg")
701         SET(JPEG_INC "${JPEG}/include")
702         SET(JPEG_LIBPATH ${JPEG}/lib)
703
704         SET(TIFF ${LIBDIR}/tiff)
705         SET(TIFF_INCLUDE_DIR ${TIFF}/include)
706         SET(TIFF_LIBRARY tiff)
707         SET(TIFF_LIBPATH ${TIFF}/lib)
708
709         SET(EXETYPE MACOSX_BUNDLE)
710
711         SET(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
712         SET(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g")
713         IF(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
714                 SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
715                 SET(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
716         ELSEIF(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
717                 SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
718                 SET(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
719         ELSE(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
720                 SET(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
721                 SET(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
722         ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
723
724         # Better warnings
725         SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
726         SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
727
728 ENDIF(APPLE)
729
730 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
731         SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
732         SET(BINRELOC_INC ${BINRELOC}/include)
733 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
734
735
736 # buildinfo
737 IF(WITH_BUILDINFO)
738         # BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
739         IF(UNIX)
740                 EXEC_PROGRAM("date \"+%Y-%m-%d\"" OUTPUT_VARIABLE BUILD_DATE)
741                 EXEC_PROGRAM("date \"+%H:%M:%S\"" OUTPUT_VARIABLE BUILD_TIME)  
742                 EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV RETURN_VALUE BUILD_REV_RETURN)
743                 IF(BUILD_REV_RETURN)
744                         SET(BUILD_REV "unknown")
745                 ENDIF(BUILD_REV_RETURN)
746         ENDIF(UNIX)
747         
748         IF(WIN32)
749                 EXEC_PROGRAM("cmd /c date /t" OUTPUT_VARIABLE BUILD_DATE)
750                 EXEC_PROGRAM("cmd /c time /t" OUTPUT_VARIABLE BUILD_TIME)  
751                 EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV RETURN_VALUE BUILD_REV_RETURN)
752                 IF(BUILD_REV_RETURN)
753                         SET(BUILD_REV "unknown")
754                 ENDIF(BUILD_REV_RETURN)
755         ENDIF(WIN32)
756 ENDIF(WITH_BUILDINFO)
757         
758 #-----------------------------------------------------------------------------
759 # Common.
760
761 set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg)
762 set(OPENJPEG_INC ${OPENJPEG})
763 set(OPENJPEG_LIb extern_libopenjpeg)
764
765 #-----------------------------------------------------------------------------
766 # Blender WebPlugin
767
768 IF(WITH_WEBPLUGIN) 
769         SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
770         SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
771
772         SET(WITH_PLAYER ON)
773 ENDIF(WITH_WEBPLUGIN)
774
775
776 #-----------------------------------------------------------------------------
777 # Configure OpenGL.
778 FIND_PACKAGE(OpenGL)
779 INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
780 # UNSET(OPENGL_LIBRARIES CACHE) # not compat with older cmake 
781 # UNSET(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake 
782
783 #-----------------------------------------------------------------------------
784 # Extra compile flags
785 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
786 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
787
788 # better not define flags here but this is a debugging option thats off by default.
789 IF(WITH_CXX_GUARDEDALLOC)
790         SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
791 ENDIF(WITH_CXX_GUARDEDALLOC)
792
793 #-----------------------------------------------------------------------------
794 # Libraries
795 FILE(WRITE ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "")
796 ADD_SUBDIRECTORY(intern)
797 ADD_SUBDIRECTORY(extern)
798 ADD_SUBDIRECTORY(source)
799
800
801 #-----------------------------------------------------------------------------
802 # Blender Application
803 ADD_SUBDIRECTORY(source/creator)
804
805
806 #-----------------------------------------------------------------------------
807 # Blender Player
808 IF(WITH_PLAYER)
809         ADD_SUBDIRECTORY(source/blenderplayer)
810 ENDIF(WITH_PLAYER)