Merged changes in the trunk up to revision 29409.
[blender.git] / source / creator / 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 # So BUILDINFO and BLENDERPATH strings are automatically quoted
28 CMAKE_POLICY(SET CMP0005 NEW)
29
30 SETUP_LIBDIRS()
31
32 INCLUDE_DIRECTORIES(
33         ../../intern/guardedalloc
34         ../blender/blenlib
35         ../blender/blenkernel
36         ../blender/editors/include
37         ../blender/makesrna
38         ../blender/imbuf
39         ../blender/render/extern/include
40         ../blender/makesdna
41         ../blender/gpu
42         ../blender/freestyle
43         ../blender/windowmanager
44         ../kernel/gen_messaging
45         ../kernel/gen_system
46 )
47
48 IF(WIN32)
49         INCLUDE_DIRECTORIES(${PTHREADS_INC})
50 ENDIF(WIN32)
51
52 IF(WITH_QUICKTIME)
53         ADD_DEFINITIONS(-DWITH_QUICKTIME)
54 ENDIF(WITH_QUICKTIME)
55
56 IF(WITH_OPENEXR)
57         ADD_DEFINITIONS(-DWITH_OPENEXR)
58 ENDIF(WITH_OPENEXR)
59
60 IF(WITH_TIFF)
61         ADD_DEFINITIONS(-DWITH_TIFF)
62 ENDIF(WITH_TIFF)
63
64 IF(WITH_PYTHON)
65         INCLUDE_DIRECTORIES(../blender/python)
66 ELSE(WITH_PYTHON)
67         ADD_DEFINITIONS(-DDISABLE_PYTHON)
68 ENDIF(WITH_PYTHON)
69
70 IF(NOT WITH_SDL)
71         ADD_DEFINITIONS(-DDISABLE_SDL)
72 ENDIF(NOT WITH_SDL)
73
74 IF(UNIX AND NOT APPLE)
75         SET(BLENDERPATH ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION})
76         # blender_path in creator.c
77         ADD_DEFINITIONS(-DBLENDERPATH="${BLENDERPATH}")
78 ENDIF(UNIX AND NOT APPLE)
79
80 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
81         ADD_DEFINITIONS(-DWITH_BINRELOC)
82         INCLUDE_DIRECTORIES(${BINRELOC_INC})
83 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
84
85 # Setup the exe sources and buildinfo
86 SET(EXESRC creator.c)
87
88 IF(WIN32)
89         SET(EXESRC ${EXESRC} ../icons/winblender.rc)
90 ENDIF(WIN32)
91
92 IF(WITH_BUILDINFO)
93         ADD_DEFINITIONS(-DBUILD_DATE="${BUILD_DATE}")
94         ADD_DEFINITIONS(-DBUILD_TIME="${BUILD_TIME}")
95         ADD_DEFINITIONS(-DBUILD_REV="${BUILD_REV}")
96         ADD_DEFINITIONS(-DBUILD_PLATFORM="${CMAKE_SYSTEM_NAME}")
97         ADD_DEFINITIONS(-DBUILD_TYPE="${CMAKE_BUILD_TYPE}")
98         
99         SET(EXESRC ${EXESRC} buildinfo.c)
100 ENDIF(WITH_BUILDINFO)
101
102 MESSAGE(STATUS "Configuring blender")
103
104 ADD_EXECUTABLE(blender ${EXETYPE} ${EXESRC})
105
106 # Post build steps for bundling/packaging.
107
108 SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
109
110 IF(WITH_INSTALL)
111
112         IF(UNIX)
113                 ADD_CUSTOM_COMMAND(TARGET blender
114                         POST_BUILD
115                         MAIN_DEPENDENCY blender
116                         #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/plugins ${TARGETDIR}/
117                         #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/text/* ${TARGETDIR}/
118                 )
119         ENDIF(UNIX)
120
121         IF(UNIX AND NOT APPLE)
122                 
123                 # Local installation, "make install" can be done after this optionally
124                 
125                 ADD_CUSTOM_COMMAND(
126                         TARGET blender POST_BUILD MAIN_DEPENDENCY blender
127                         COMMAND rm -Rf ${TARGETDIR}/.blender
128                         COMMAND mkdir ${TARGETDIR}/.blender/
129                         COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/.blender/
130                 )
131     
132                 IF(WITH_INTERNATIONAL)
133                         ADD_CUSTOM_COMMAND(
134                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
135                                 COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/.blender/
136                                 COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/.blender/
137                         )
138                 ENDIF(WITH_INTERNATIONAL)
139     
140                 IF(WITH_PYTHON)
141                         ADD_CUSTOM_COMMAND(
142                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
143                                 COMMENT "copying blender scripts..."
144                                 COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/.blender/
145                                 COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;"
146                         )
147       
148                         # Copy the systems python into the install directory
149                         # Scons copy in tools/Blender.py
150                         ADD_CUSTOM_COMMAND(
151                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
152                                 COMMENT "copying a subset of the systems python..."
153         
154                                 COMMAND mkdir ${TARGETDIR}/.blender/python # PYTHONPATH and PYTHONHOME is set here
155                                 COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
156                                 COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
157         
158                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
159                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3
160                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/idlelib
161                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/tkinter
162                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/config
163         
164                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages
165                                 COMMAND mkdir ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages    # python needs it.
166
167                                 COMMAND rm -f ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib-dynload/_tkinter.so
168                                 COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "test" -prune -exec rm -rf {} "\;"
169                                 COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
170                                 COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
171                         )
172      
173                 ENDIF(WITH_PYTHON)
174       
175                 ADD_CUSTOM_COMMAND(
176                         TARGET blender POST_BUILD MAIN_DEPENDENCY blender
177                         COMMAND find ${TARGETDIR} -name .svn -prune -exec rm -rf {} "\;"
178                 )
179     
180     
181                 # Above we bundle a portable distrobution in ./bin
182                 # This is an optional "make install" which installs blender on the system.
183                 INSTALL(
184                         PROGRAMS ${TARGETDIR}/blender
185                         DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
186                 )
187
188                 IF(WITH_GAMEENGINE AND WITH_PLAYER)
189                         INSTALL(
190                                 PROGRAMS ${TARGETDIR}/blenderplayer
191                                 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
192                         )
193                 ENDIF(WITH_GAMEENGINE AND WITH_PLAYER)
194
195                 INSTALL(
196                         DIRECTORY ${TARGETDIR}/.blender/
197                         DESTINATION ${BLENDERPATH}
198                 )
199                 # end "make install"
200     
201         ENDIF(UNIX AND NOT APPLE)
202
203         IF(APPLE)
204                 SET(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app)
205                 SET(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
206                 SET(TARGETINFO ${TARGETDIR}/blender.app/Contents/Info.plist)
207
208                 ADD_CUSTOM_COMMAND(
209                         TARGET blender POST_BUILD MAIN_DEPENDENCY blender
210                         COMMAND cp -Rf ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/
211                         COMMAND cp -Rf ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/
212                         COMMAND cp -Rf ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/
213                         COMMAND cat ${SOURCEINFO} | sed s/VERSION/`cat ${CMAKE_SOURCE_DIR}/release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO}
214                         COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/.blender
215                         COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
216                         COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
217                 )
218       
219                 IF(WITH_INTERNATIONAL)
220                         ADD_CUSTOM_COMMAND(
221                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
222                                 COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
223                                 COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/Resources/
224                                 COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
225                                 COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/Resources/
226                         )
227                 ENDIF(WITH_INTERNATIONAL)
228       
229                 IF(WITH_PYTHON)
230                         IF(WITH_LIBS10.5)
231                                 SET(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
232                         ELSE(WITH_LIBS10.5)
233                                 SET(PYTHON_ZIP "python.zip")
234                         ENDIF(WITH_LIBS10.5)
235                         ADD_CUSTOM_COMMAND(
236                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
237                                 COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
238                                 COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
239                                 COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
240                                 COMMAND find ${TARGETDIR}/blender.app -name "*.py?" -prune -exec rm -rf {} "\;"
241                         )
242                 ENDIF(WITH_PYTHON)      
243     
244                 ADD_CUSTOM_COMMAND(
245                         TARGET blender POST_BUILD MAIN_DEPENDENCY blender    
246                         COMMAND find ${TARGETDIR}/blender.app -name .DS_Store -prune -exec rm -rf {} "\;"
247                         COMMAND find ${TARGETDIR}/blender.app -name .svn -prune -exec rm -rf {} "\;"
248                         COMMAND find ${TARGETDIR}/blender.app -name __MACOSX -prune -exec rm -rf {} "\;"
249                 )
250         ENDIF(APPLE)
251
252         IF(WIN32)
253                 ADD_CUSTOM_COMMAND(TARGET blender
254                         POST_BUILD
255                         MAIN_DEPENDENCY blender
256                         COMMAND if not exist \"${TARGETDIR}\\.blender\" mkdir \"${TARGETDIR}\\.blender\"
257                         COMMAND if not exist \"${TARGETDIR}\\.blender\\locale\" mkdir \"${TARGETDIR}\\.blender\\locale\"
258                         COMMAND if not exist \"${TARGETDIR}\\.blender\\scripts\" mkdir \"${TARGETDIR}\\.blender\\scripts\"
259                         COMMAND if not exist \"${TARGETDIR}\\plugins\" mkdir \"${TARGETDIR}\\plugins\"
260                         COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\.blender\\\" 
261                         COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" \"${TARGETDIR}\\.blender\\\"
262                         COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\.blender\\locale\"
263                         COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\release\\scripts\\*.*\" \"${TARGETDIR}\\.blender\\scripts\"
264                         COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\release\\plugins\\*.*\" \"${TARGETDIR}\\plugins\"
265                         COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\"
266                         # TODO, copy python bundle
267                         # COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\release\\windows\\extra\\python31.zip\" \"${TARGETDIR}\\\"
268                 )
269     
270                 ADD_CUSTOM_COMMAND(TARGET blender
271                         POST_BUILD
272                         MAIN_DEPENDENCY blender
273                         COMMAND copy /Y \"${LIBDIR}\\release\\python31.zip\" \"${TARGETDIR}\\\"
274                         COMMAND copy /Y \"${LIBDIR}\\release\\python31.zip\" \"${TARGETDIR}\\python31_d.zip\"
275                         COMMAND copy /Y \"${LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" \"${TARGETDIR}\\\"
276                         COMMAND copy /Y \"${LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\"
277                         COMMAND copy /Y \"${LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\"
278                         COMMAND copy /Y \"${LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\"
279                         COMMAND copy /Y \"${LIBDIR}\\python\\lib\\python31.dll\" \"${TARGETDIR}\\\"
280                         COMMAND copy /Y \"${LIBDIR}\\python\\lib\\python31_d.dll\" \"${TARGETDIR}\\\"
281                         COMMAND copy /Y \"${LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\"
282                         # COMMAND copy /Y \"${LIBDIR}\\samplerate\\lib\\libsamplerate-0.dll\" \"${TARGETDIR}\\\"
283                 )
284
285                 IF(WITH_INTERNATIONAL)
286                         ADD_CUSTOM_COMMAND(TARGET blender
287                                 POST_BUILD
288                                 MAIN_DEPENDENCY blender
289                                 COMMAND copy /Y \"${LIBDIR}\\iconv\\lib\\iconv.dll\" \"${TARGETDIR}\\\"
290                         )
291                 ENDIF(WITH_INTERNATIONAL)
292
293                 IF(WITH_FFMPEG)
294                         ADD_CUSTOM_COMMAND(TARGET blender
295                                 POST_BUILD
296                                 MAIN_DEPENDENCY blender
297                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\avcodec-52.dll\" \"${TARGETDIR}\\\"
298                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\avformat-52.dll\" \"${TARGETDIR}\\\"
299                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\avdevice-52.dll\" \"${TARGETDIR}\\\"
300                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\avutil-50.dll\" \"${TARGETDIR}\\\"
301                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\libfaac-0.dll\" \"${TARGETDIR}\\\"
302                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\libfaad-2.dll\" \"${TARGETDIR}\\\"
303                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\libmp3lame-0.dll\" \"${TARGETDIR}\\\"
304                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\libx264-67.dll\" \"${TARGETDIR}\\\"
305                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\swscale-0.dll\" \"${TARGETDIR}\\\"
306                                 COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\xvidcore.dll\" \"${TARGETDIR}\\\"
307                         )
308                 ENDIF(WITH_FFMPEG)
309
310                 IF(WITH_SNDFILE)
311                         ADD_CUSTOM_COMMAND(TARGET blender
312                                 POST_BUILD
313                                 MAIN_DEPENDENCY blender
314                                 COMMAND copy /Y \"${LIBDIR}\\sndfile\\lib\\libsndfile-1.dll\" \"${TARGETDIR}\\\"
315                         )
316                 ENDIF(WITH_SNDFILE)
317
318                 IF(WITH_JACK)
319                         ADD_CUSTOM_COMMAND(TARGET blender
320                                 POST_BUILD
321                                 MAIN_DEPENDENCY blender
322                                 COMMAND copy /Y \"${LIBDIR}\\jack\\lib\\libjack.dll\" \"${TARGETDIR}\\\"
323                         )
324                 ENDIF(WITH_JACK)
325
326                 IF(WITH_OPENAL)
327                         ADD_CUSTOM_COMMAND(TARGET blender
328                                 POST_BUILD
329                                 MAIN_DEPENDENCY blender
330                                 COMMAND copy /Y \"${LIBDIR}\\openal\\lib\\OpenAL32.dll\" \"${TARGETDIR}\\\"
331                                 COMMAND copy /Y \"${LIBDIR}\\openal\\lib\\wrap_oal.dll\" \"${TARGETDIR}\\\"
332
333                         )
334                 ENDIF(WITH_OPENAL)
335
336
337         ENDIF(WIN32)
338 ENDIF(WITH_INSTALL)
339
340 ADD_DEPENDENCIES(blender makesdna)
341
342 FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
343
344 SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager blender_render)
345
346 IF(WITH_ELBEEM)
347         SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} bf_elbeem)
348 ENDIF(WITH_ELBEEM)
349
350 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
351         SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
352 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
353
354 #IF(UNIX)
355         # Sort libraries
356         SET(BLENDER_SORTED_LIBS
357                 bf_windowmanager
358
359         bf_editor_space_api
360         bf_editor_space_action
361         bf_editor_space_buttons
362         bf_editor_space_console
363         bf_editor_space_file
364         bf_editor_space_graph
365         bf_editor_space_image
366         bf_editor_space_info
367         bf_editor_space_logic
368         bf_editor_space_nla
369         bf_editor_space_node
370         bf_editor_space_outliner
371         bf_editor_space_script
372         bf_editor_space_sequencer
373         bf_editor_space_sound
374         bf_editor_space_time
375         bf_editor_space_userpref
376         bf_editor_space_view3d
377
378         bf_editor_text
379         bf_editor_transform
380         bf_editor_util
381         bf_editor_uvedit
382         bf_editor_curve
383         bf_editor_armature
384         bf_editor_gpencil
385         bf_editor_interface
386         bf_editor_mesh
387         bf_editor_metaball
388         bf_editor_object
389         bf_editor_physics
390         bf_editor_render
391         bf_editor_screen
392         bf_editor_sculpt_paint
393         bf_editor_sound
394         bf_editor_animation
395         bf_editor_datafiles
396
397                 bf_freestyle
398                 blender_BSP 
399                 bf_ghost 
400                 bf_string 
401                 blender_render 
402                 blender_ONL 
403                 bf_python 
404                 bf_gen_python 
405                 bf_ikplugin
406                 bf_modifiers
407                 bf_blenkernel
408                 bf_nodes
409                 bf_gpu
410                 bf_blenloader
411                 bf_blenpluginapi 
412                 bf_imbuf 
413                 bf_blenlib 
414                 bf_avi 
415                 bf_cineon 
416                 bf_openexr 
417                 bf_dds
418                 bf_readblenfile
419                 bf_collada
420                 blender_BSP 
421                 blender_bop 
422                 bf_kernel 
423                 bf_decimation 
424                 bf_elbeem 
425                 bf_IK 
426                 bf_memutil 
427                 bf_guardedalloc 
428                 blender_CTR 
429                 bf_moto 
430                 bf_windowmanager
431                 bf_editors
432                 bf_blroutines 
433                 bf_converter 
434                 bf_dummy 
435                 bf_bullet 
436                 bf_smoke
437                 bf_minilzo
438                 bf_lzma
439                 bf_common 
440                 bf_ketsji 
441                 bf_logic 
442                 bf_rasterizer 
443                 bf_oglrasterizer 
444                 bf_expressions 
445                 bf_scenegraph 
446                 bf_moto 
447                 bf_blroutines 
448                 kx_network 
449                 bf_kernel 
450                 bf_ngnetwork 
451                 extern_bullet 
452                 bf_loopbacknetwork 
453                 bf_ITASC
454                 bf_common 
455                 bf_moto 
456                 bf_python
457                 bf_gen_python
458                 extern_binreloc
459                 extern_glew
460                 extern_libopenjpeg
461                 bf_videotex
462                 bf_rna
463                 bf_dna
464                 bf_blenfont
465                 bf_audaspace
466                 bf_decimation
467
468         )
469
470         IF(WITH_CXX_GUARDEDALLOC)
471                 SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
472         ENDIF(WITH_CXX_GUARDEDALLOC)
473
474         IF(WITH_QUICKTIME)
475                 SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_quicktime)
476         ENDIF(WITH_QUICKTIME)
477
478
479         FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
480                 SET(REMLIB ${SORTLIB})
481                 FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
482                         IF(${SEARCHLIB} STREQUAL ${SORTLIB})
483                                 SET(REMLIB "")
484                         ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
485                 ENDFOREACH(SEARCHLIB)
486                 IF(REMLIB)
487                         MESSAGE(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
488                         LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
489                 ENDIF(REMLIB)
490         ENDFOREACH(SORTLIB)
491         TARGET_LINK_LIBRARIES(blender ${BLENDER_SORTED_LIBS})
492 #ELSE(UNIX)
493 #       TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS})
494 #ENDIF(UNIX)
495
496 SETUP_LIBLINKS(blender)