removed double library entries without realizing I had the BGE disabled, these are...
[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., 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 # So BUILDINFO and BLENDERPATH strings are automatically quoted
28 CMAKE_POLICY(SET CMP0005 NEW)
29
30 SETUP_LIBDIRS()
31
32 INCLUDE_DIRECTORIES(../../intern/guardedalloc
33         ../blender/blenlib
34         ../blender/blenkernel
35         ../blender/editors/include
36         ../blender/makesrna
37         ../blender/makesrna/intern
38         ../blender/nodes
39         ../blender/include
40         ../blender/blenloader
41         ../blender/imbuf
42         ../blender/renderconverter
43         ../blender/render/extern/include
44         ../blender/makesdna
45         ../blender/gpu
46         ../blender/windowmanager
47         ../kernel/gen_messaging
48         ../kernel/gen_system
49         ../../extern/glew/include
50 )
51
52
53
54 IF(WITH_QUICKTIME)
55         ADD_DEFINITIONS(-DWITH_QUICKTIME)
56 ENDIF(WITH_QUICKTIME)
57
58 IF(WITH_OPENEXR)
59         ADD_DEFINITIONS(-DWITH_OPENEXR)
60 ENDIF(WITH_OPENEXR)
61
62 IF(WITH_PYTHON)
63         INCLUDE_DIRECTORIES(../blender/python)
64 ELSE(WITH_PYTHON)
65         ADD_DEFINITIONS(-DDISABLE_PYTHON)
66 ENDIF(WITH_PYTHON)
67
68 IF(NOT WITH_SDL)
69         ADD_DEFINITIONS(-DDISABLE_SDL)
70 ENDIF(NOT WITH_SDL)
71
72 IF(UNIX AND NOT APPLE)
73         SET(BLENDERPATH ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION})
74         # blender_path in creator.c
75         ADD_DEFINITIONS(-DBLENDERPATH="${BLENDERPATH}")
76 ENDIF(UNIX AND NOT APPLE)
77
78 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
79         ADD_DEFINITIONS(-DWITH_BINRELOC)
80         INCLUDE_DIRECTORIES(${BINRELOC_INC})
81 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
82
83 # Setup the exe sources and buildinfo
84 SET(EXESRC creator.c)
85
86 IF(WIN32)
87         SET(EXESRC ${EXESRC} ../icons/winblender.rc)
88 ENDIF(WIN32)
89
90 IF(WITH_BUILDINFO)
91         ADD_DEFINITIONS(-DBUILD_DATE="${BUILD_DATE}")
92         ADD_DEFINITIONS(-DBUILD_TIME="${BUILD_TIME}")
93         ADD_DEFINITIONS(-DBUILD_REV="${BUILD_REV}")
94         ADD_DEFINITIONS(-DBUILD_PLATFORM="${CMAKE_SYSTEM_NAME}")
95         ADD_DEFINITIONS(-DBUILD_TYPE="${CMAKE_BUILD_TYPE}")
96         
97         SET(EXESRC ${EXESRC} buildinfo.c)
98 ENDIF(WITH_BUILDINFO)
99
100 MESSAGE(STATUS "Configuring blender")
101
102 ADD_EXECUTABLE(blender ${EXETYPE} ${EXESRC})
103
104 # Post build steps for bundling/packaging.
105
106 SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
107
108 IF(WITH_INSTALL)
109
110         IF(UNIX)
111                 ADD_CUSTOM_COMMAND(TARGET blender
112                         POST_BUILD
113                         MAIN_DEPENDENCY blender
114                         #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/plugins ${TARGETDIR}/
115                         #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/text/* ${TARGETDIR}/
116                 )
117         ENDIF(UNIX)
118
119         IF(UNIX AND NOT APPLE)
120                 
121                 # Local installation, "make install" can be done after this optionally
122                 
123                 ADD_CUSTOM_COMMAND(
124                         TARGET blender POST_BUILD MAIN_DEPENDENCY blender
125                         COMMAND rm -Rf ${TARGETDIR}/.blender
126                         COMMAND mkdir ${TARGETDIR}/.blender/
127                         COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/.blender/
128                 )
129     
130                 IF(WITH_INTERNATIONAL)
131                         ADD_CUSTOM_COMMAND(
132                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
133                                 COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/.blender/
134                                 COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/.blender/
135                         )
136                 ENDIF(WITH_INTERNATIONAL)
137     
138                 IF(WITH_PYTHON)
139                         ADD_CUSTOM_COMMAND(
140                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
141                                 COMMENT "copying blender scripts..."
142                                 COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/ui ${TARGETDIR}/.blender/
143                                 COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/io ${TARGETDIR}/.blender/
144                                 COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;"
145                         )
146       
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/python # PYTHONPATH and PYTHONHOME is set here
154                                 COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
155                                 COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
156         
157                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
158                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3
159                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/idlelib
160                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/tkinter
161                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/config
162         
163                                 COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages
164                                 COMMAND mkdir ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages    # python needs it.
165
166                                 COMMAND rm -f ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib-dynload/_tkinter.so
167                                 COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "test" -prune -exec rm -rf {} "\;"
168                                 COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
169                                 COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
170                         )
171      
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 distrobution 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                         DIRECTORY ${TARGETDIR}/.blender/
196                         DESTINATION ${BLENDERPATH}
197                 )
198                 # end "make install"
199     
200         ENDIF(UNIX AND NOT APPLE)
201
202         IF(APPLE)
203                 SET(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app)
204                 SET(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
205                 SET(TARGETINFO ${TARGETDIR}/blender.app/Contents/Info.plist)
206
207                 ADD_CUSTOM_COMMAND(
208                         TARGET blender POST_BUILD MAIN_DEPENDENCY blender
209                         COMMAND cp -R ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/
210                         COMMAND cp -R ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/
211                         COMMAND cp -R ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/
212                         COMMAND cat ${SOURCEINFO} | sed s/VERSION/`cat ${CMAKE_SOURCE_DIR}/release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO}
213                         COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/.blender
214                         COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
215                         COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
216                 )
217       
218                 IF(WITH_INTERNATIONAL)
219                         ADD_CUSTOM_COMMAND(
220                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
221                                 COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
222                                 COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/Resources/
223                                 COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
224                                 COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/Resources/
225                         )
226                 ENDIF(WITH_INTERNATIONAL)
227       
228                 IF(WITH_PYTHON)
229                         ADD_CUSTOM_COMMAND(
230                                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
231                                 COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/ui ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
232                                 COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/io ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
233                                 COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
234                                 COMMAND unzip -q ${LIBDIR}/release/python.zip -d ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
235                                 COMMAND find ${TARGETDIR}/blender.app -name "*.py?" -prune -exec rm -rf {} "\;"
236                         )
237                 ENDIF(WITH_PYTHON)      
238     
239                 ADD_CUSTOM_COMMAND(
240                         TARGET blender POST_BUILD MAIN_DEPENDENCY blender    
241                         COMMAND find ${TARGETDIR}/blender.app -name .DS_Store -prune -exec rm -rf {} "\;"
242                         COMMAND find ${TARGETDIR}/blender.app -name .svn -prune -exec rm -rf {} "\;"
243                 )
244         ENDIF(APPLE)
245
246         IF(WIN32)
247                 FILE(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} WIN_SOURCE_DIR)
248     
249                 ADD_CUSTOM_COMMAND(TARGET blender
250                         POST_BUILD
251                         MAIN_DEPENDENCY blender
252                         COMMAND if not exist \"${TARGETDIR}\\.blender\" mkdir \"${TARGETDIR}\\.blender\"
253                         COMMAND if not exist \"${TARGETDIR}\\.blender\\locale\" mkdir \"${TARGETDIR}\\.blender\\locale\"
254                         COMMAND if not exist \"${TARGETDIR}\\.blender\\ui\" mkdir \"${TARGETDIR}\\.blender\\ui\"
255                         COMMAND if not exist \"${TARGETDIR}\\.blender\\io\" mkdir \"${TARGETDIR}\\.blender\\io\"
256                         COMMAND if not exist \"${TARGETDIR}\\plugins\" mkdir \"${TARGETDIR}\\plugins\"
257                         COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\.blender\\\" 
258                         COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" \"${TARGETDIR}\\.blender\\\"
259                         COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\.blender\\locale\"
260                         COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" \"${TARGETDIR}\\.blender\\scripts\"
261                         COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\ui\\*.*\" \"${TARGETDIR}\\.blender\\ui\"
262                         COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\io\\*.*\" \"${TARGETDIR}\\.blender\\io\"
263                         COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" \"${TARGETDIR}\\plugins\"
264                         COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\"
265                         COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\windows\\extra\\python26.zip\" \"${TARGETDIR}\\\"
266                 )
267     
268                 FILE(TO_NATIVE_PATH "${LIBDIR}" WIN_LIBDIR)
269     
270                 ADD_CUSTOM_COMMAND(TARGET blender
271                         POST_BUILD
272                         MAIN_DEPENDENCY blender
273                         COMMAND copy /Y \"${WIN_LIBDIR}\\release\\python31.zip\" \"${TARGETDIR}\\\"
274                         COMMAND copy /Y \"${WIN_LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" \"${TARGETDIR}\\\"
275                         COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\"
276                         COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\"
277                         COMMAND copy /Y \"${WIN_LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\"
278                         COMMAND copy /Y \"${WIN_LIBDIR}\\tiff\\lib\\libtiff.dll\" \"${TARGETDIR}\\\"
279                         COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31.dll\" \"${TARGETDIR}\\\"
280                         COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31_d.dll\" \"${TARGETDIR}\\\"
281                         COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\"
282                         COMMAND copy /Y \"${WIN_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 \"${WIN_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 \"${WIN_LIBDIR}\\ffmpeg\\lib\\avcodec-52.dll\" \"${TARGETDIR}\\\"
298                                 COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avformat-52.dll\" \"${TARGETDIR}\\\"
299                                 COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avdevice-52.dll\" \"${TARGETDIR}\\\"
300                                 COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avutil-50.dll\" \"${TARGETDIR}\\\"
301                                 COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaac-0.dll\" \"${TARGETDIR}\\\"
302                                 COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaad-2.dll\" \"${TARGETDIR}\\\"
303                                 COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libmp3lame-0.dll\" \"${TARGETDIR}\\\"
304                                 COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libx264-67.dll\" \"${TARGETDIR}\\\"
305                                 COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\swscale-0.dll\" \"${TARGETDIR}\\\"
306                                 COMMAND copy /Y \"${WIN_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 \"${WIN_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 \"${WIN_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 \"${WIN_LIBDIR}\\openal\\lib\\OpenAL32.dll\" \"${TARGETDIR}\\\"
331                                 COMMAND copy /Y \"${WIN_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 bf_editors 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                 bf_editors
359                 bf_decimation 
360                 blender_BSP 
361                 bf_ghost 
362                 bf_string 
363                 blender_render 
364                 blender_ONL 
365                 bf_python 
366                 bf_gen_python 
367                 bf_ikplugin
368                 bf_blenkernel 
369                 bf_nodes
370                 bf_gpu
371                 bf_blenloader 
372                 bf_blenpluginapi 
373                 bf_imbuf 
374                 bf_blenlib 
375                 bf_avi 
376                 bf_cineon 
377                 bf_openexr 
378                 bf_dds
379                 bf_readblenfile 
380                 blender_bop 
381                 bf_kernel 
382                 bf_decimation 
383                 bf_elbeem 
384                 bf_IK 
385                 bf_memutil 
386                 bf_guardedalloc 
387                 blender_CTR 
388                 bf_moto 
389                 bf_windowmanager
390                 bf_editors
391                 bf_blroutines 
392                 bf_converter 
393                 bf_dummy 
394                 bf_bullet 
395                 bf_smoke
396                 bf_minilzo
397                 bf_lzma
398                 bf_common 
399                 bf_ketsji 
400                 bf_logic 
401                 bf_rasterizer 
402                 bf_oglrasterizer 
403                 bf_expressions 
404                 bf_scenegraph 
405                 bf_moto 
406                 bf_blroutines 
407                 kx_network 
408                 bf_kernel 
409                 bf_ngnetwork 
410                 extern_bullet 
411                 bf_loopbacknetwork 
412                 bf_ITASC
413                 bf_common 
414                 bf_moto 
415                 bf_python
416                 bf_gen_python
417                 extern_binreloc
418                 extern_glew
419                 extern_libopenjpeg
420                 bf_videotex
421                 bf_rna
422                 bf_dna
423                 bf_blenfont
424                 bf_audaspace
425         )
426
427         IF(WITH_CXX_GUARDEDALLOC)
428                 SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
429         ENDIF(WITH_CXX_GUARDEDALLOC)
430
431         IF(WITH_QUICKTIME)
432                 SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_quicktime)
433         ENDIF(WITH_QUICKTIME)
434
435
436         FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
437                 SET(REMLIB ${SORTLIB})
438                 FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
439                         IF(${SEARCHLIB} STREQUAL ${SORTLIB})
440                                 SET(REMLIB "")
441                         ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
442                 ENDFOREACH(SEARCHLIB)
443                 IF(REMLIB)
444                         MESSAGE(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
445                         LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
446                 ENDIF(REMLIB)
447         ENDFOREACH(SORTLIB)
448         TARGET_LINK_LIBRARIES(blender ${BLENDER_SORTED_LIBS})
449 ELSE(UNIX)
450         TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS})
451 ENDIF(UNIX)
452
453 SETUP_LIBLINKS(blender)