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