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