1 # -*- mode: cmake; indent-tabs-mode: t; -*-
2 # ***** BEGIN GPL LICENSE BLOCK *****
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.
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.
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.
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
21 # The Original Code is: all of this file.
23 # Contributor(s): Jacques Beaurain.
25 # ***** END GPL LICENSE BLOCK *****
30 ../../intern/guardedalloc
34 ../blender/editors/include
37 ../blender/render/extern/include
40 ../blender/windowmanager
43 if(WITH_CODEC_QUICKTIME)
44 add_definitions(-DWITH_QUICKTIME)
47 if(WITH_IMAGE_OPENEXR)
48 add_definitions(-DWITH_OPENEXR)
51 if(WITH_IMAGE_OPENJPEG)
52 add_definitions(-DWITH_OPENJPEG)
56 add_definitions(-DWITH_TIFF)
60 add_definitions(-DWITH_DDS)
64 add_definitions(-DWITH_CINEON)
68 add_definitions(-DWITH_HDR)
72 blender_include_dirs(../../extern/libmv)
73 add_definitions(-DWITH_LIBMV)
77 blender_include_dirs(../blender/python)
78 add_definitions(-DWITH_PYTHON)
80 if(WITH_PYTHON_SECURITY)
81 add_definitions(-DWITH_PYTHON_SECURITY)
86 add_definitions(-DWITH_HEADLESS)
90 blender_include_dirs(../gameengine/BlenderRoutines)
92 add_definitions(-DWITH_GAMEENGINE)
96 add_definitions(-DWITH_SDL)
100 add_definitions(-DWITH_BINRELOC)
101 blender_include_dirs(${BINRELOC_INCLUDE_DIRS})
104 # Setup the exe sources and buildinfo
109 # MSVC 2010 gives linking errors with the manifest
110 if(WIN32 AND NOT UNIX)
111 string(SUBSTRING ${BLENDER_VERSION} 0 1 bver1)
112 string(SUBSTRING ${BLENDER_VERSION} 2 1 bver2)
113 string(SUBSTRING ${BLENDER_VERSION} 3 1 bver3)
117 -DBLEN_VER_RC_STR_M=${BLENDER_VERSION}
118 -DBLEN_VER_RC_1=${bver1}
119 -DBLEN_VER_RC_2=${bver2}
120 -DBLEN_VER_RC_3=${bver3}
125 -DBLEN_VER_RC_STR=${BLENDER_VERSION}
126 -DBLEN_VER_RC_1=${bver1}
127 -DBLEN_VER_RC_2=${bver2}
128 -DBLEN_VER_RC_3=${bver3}
135 ../icons/winblender.rc
140 add_definitions(-DWITH_BUILDINFO)
141 # --------------------------------------------------------------------------
142 # These defines could all be moved into the header below
143 string(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}")
144 string(REPLACE " " "\ " BUILDINFO_CXXFLAGS "${CMAKE_CXX_FLAGS}")
145 string(REPLACE " " "\ " BUILDINFO_LINKFLAGS "${PLATFORM_LINKFLAGS}")
147 # # define in header now, else these get out of date on rebuilds.
148 # -DBUILD_DATE="${BUILD_DATE}"
149 # -DBUILD_TIME="${BUILD_TIME}"
150 # -DBUILD_REV="${BUILD_REV}"
151 -DWITH_BUILDINFO_HEADER # alternative to lines above
152 -DBUILD_PLATFORM="${CMAKE_SYSTEM_NAME}"
153 -DBUILD_TYPE="${CMAKE_BUILD_TYPE}"
154 -DBUILD_CFLAGS="${BUILDINFO_CFLAGS}"
155 -DBUILD_CXXFLAGS="${BUILDINFO_CXXFLAGS}"
156 -DBUILD_LINKFLAGS="${BUILDINFO_LINKFLAGS}"
157 -DBUILD_SYSTEM="CMake"
160 # --------------------------------------------------------------------------
161 # write header for values that change each build
162 # note, generaed file is in build dir's source/creator
163 # except when used as an include path.
165 # include the output directory, where the buildinfo.h file is generated
166 include_directories(${CMAKE_BINARY_DIR}/source/creator)
168 # a custom target that is always built
169 add_custom_target(buildinfo ALL
170 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildinfo.h)
172 # creates svnheader.h using cmake script
173 add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/buildinfo.h
174 COMMAND ${CMAKE_COMMAND}
175 -DSOURCE_DIR=${CMAKE_SOURCE_DIR}
176 -P ${CMAKE_SOURCE_DIR}/build_files/cmake/buildinfo.cmake)
178 # buildinfo.h is a generated file
179 set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/buildinfo.h
180 PROPERTIES GENERATED TRUE
181 HEADER_FILE_ONLY TRUE)
183 # add deps below, after adding blender
184 # -------------- done with header values.
191 # message(STATUS "Configuring blender")
192 if(WITH_PYTHON_MODULE)
193 add_definitions(-DWITH_PYTHON_MODULE)
195 # creates ./bin/bpy.so which can be imported as a python module.
196 add_library(blender SHARED ${SRC})
197 set_target_properties(
202 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
203 RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin # only needed on windows
207 # python modules use this
208 set_target_properties(
216 add_executable(blender ${EXETYPE} ${SRC})
220 # explicitly say that the executable depends on the buildinfo
221 add_dependencies(blender buildinfo)
224 # Post build steps for bundling/packaging.
228 # ${CMAKE_CFG_INTDIR} should replace \${BUILD_TYPE} when using add_command
229 set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE})
231 set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE})
233 set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH})
237 # -----------------------------------------------------------------------------
240 set(BLENDER_TEXT_FILES
241 ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
242 ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
243 ${CMAKE_SOURCE_DIR}/release/text/copyright.txt
244 ${CMAKE_SOURCE_DIR}/release/text/readme.html
247 if(UNIX AND NOT APPLE)
249 if(WITH_INSTALL_PORTABLE)
250 set(TARGETDIR_VER ${TARGETDIR}/${BLENDER_VERSION})
252 if(WITH_PYTHON_MODULE)
253 set(TARGETDIR_VER ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${BLENDER_VERSION})
255 set(TARGETDIR_VER ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION})
259 # important to make a clean install each time
260 # else old scripts get loaded.
263 "file(REMOVE_RECURSE ${TARGETDIR_VER})"
266 # message after building.
268 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
269 COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${TARGETDIR_VER}'
272 # there are a few differences between portable and system install
273 if(WITH_INSTALL_PORTABLE)
276 ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
277 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg
278 ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
279 DESTINATION ${TARGETDIR}
284 ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py
285 DESTINATION ${TARGETDIR}
289 FILES ${BLENDER_TEXT_FILES}
290 DESTINATION ${TARGETDIR}
294 # main blender binary
295 if(WITH_PYTHON_MODULE)
299 DESTINATION ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages
303 PROGRAMS ${TARGETDIR}/blender
304 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
309 if(WITH_GAMEENGINE AND WITH_PLAYER)
311 PROGRAMS ${TARGETDIR}/blenderplayer
312 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
318 FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
319 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
323 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/16x16
324 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/22x22
325 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/24x24
326 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/32x32
327 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/48x48
328 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/256x256
329 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor
330 PATTERN ".svn" EXCLUDE
331 PATTERN "*.svg" EXCLUDE
334 FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg
335 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps
338 PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py
339 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
342 FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
343 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
346 FILES ${BLENDER_TEXT_FILES}
347 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender
351 if(WITH_INTERNATIONAL)
354 ${CMAKE_SOURCE_DIR}/release/datafiles/locale
355 ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
356 DESTINATION ${TARGETDIR_VER}/datafiles
357 PATTERN ".svn" EXCLUDE
361 # plugins in blender 2.5 don't work at the moment.
364 # DIRECTORY ${CMAKE_SOURCE_DIR}/release/plugins
365 # DESTINATION ${TARGETDIR_VER}
366 # PATTERN ".svn" EXCLUDE
370 # install(CODE "message(\"copying blender scripts...\")")
372 DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts
373 DESTINATION ${TARGETDIR_VER}
374 PATTERN ".svn" EXCLUDE
375 PATTERN "__pycache__" EXCLUDE
378 if(WITH_PYTHON_INSTALL)
379 # Copy the systems python into the install directory
380 # Scons copy in tools/Blender.py
381 # install(CODE "message(\"copying a subset of the systems python...\")")
383 DIRECTORY ${PYTHON_LIBPATH}/python${PYTHON_VERSION}
384 DESTINATION ${TARGETDIR_VER}/python/lib
385 PATTERN ".svn" EXCLUDE
386 PATTERN "__pycache__" EXCLUDE # * any cache *
387 PATTERN "distutils" EXCLUDE # ./distutils
388 PATTERN "lib2to3" EXCLUDE # ./lib2to3
389 PATTERN "config" EXCLUDE # ./config
390 PATTERN "config-*" EXCLUDE # ./config-*
391 PATTERN "site-packages/*" EXCLUDE # ./site-packages/*
392 PATTERN "tkinter" EXCLUDE # ./tkinter
393 PATTERN "lib-dynload/_tkinter.*" EXCLUDE # ./lib-dynload/_tkinter.co
394 PATTERN "idlelib" EXCLUDE # ./idlelib
395 PATTERN "test" EXCLUDE # ./test
396 PATTERN "turtledemo" EXCLUDE # ./turtledemo
397 PATTERN "turtle.py" EXCLUDE # ./turtle.py
400 # # doesnt work, todo
401 # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
406 set(TARGETDIR_VER ${TARGETDIR}/${BLENDER_VERSION})
408 install( # same as linux!, deduplicate
410 "file(REMOVE_RECURSE ${TARGETDIR_VER})"
413 install( # same as linux!, deduplicate
414 FILES ${BLENDER_TEXT_FILES}
415 DESTINATION ${TARGETDIR}
418 if(WITH_INTERNATIONAL) # same as linux!, deduplicate
421 ${CMAKE_SOURCE_DIR}/release/datafiles/locale
422 ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
423 DESTINATION ${TARGETDIR_VER}/datafiles
424 PATTERN ".svn" EXCLUDE
428 FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
429 DESTINATION ${TARGETDIR}
434 FILES ${LIBDIR}/iconv/lib/iconv.dll
435 DESTINATION ${TARGETDIR}
440 # plugins in blender 2.5 don't work at the moment.
443 # DIRECTORY ${CMAKE_SOURCE_DIR}/release/plugins
444 # DESTINATION ${TARGETDIR_VER}
445 # PATTERN ".svn" EXCLUDE
449 # install(CODE "message(\"copying blender scripts...\")")
450 install( # same as linux!, deduplicate
451 DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts
452 DESTINATION ${TARGETDIR_VER}
453 PATTERN ".svn" EXCLUDE
454 PATTERN "__pycache__" EXCLUDE
458 FILES ${LIBDIR}/python/lib/python32.dll
459 DESTINATION ${TARGETDIR}
460 CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
464 FILES ${LIBDIR}/python/lib/python32_d.dll
465 DESTINATION ${TARGETDIR}
469 if(WITH_PYTHON_INSTALL)
470 # note, as far as python is concerned 'RelWithDebInfo' is not debug since its without debug flags.
472 # create the directory in multiple steps, so it actually gets created when it doesn't exist yet
476 message(\"creating ${TARGETDIR_VER}/python/lib\")
477 file(MAKE_DIRECTORY \"${TARGETDIR_VER}/python\")
478 file(MAKE_DIRECTORY \"${TARGETDIR_VER}/python/lib\")
479 message(\"done creating dir\")
486 if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" STREQUAL \"Debug\")
487 execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
488 \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32_d.tar.gz\")
490 execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
491 \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
497 # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
502 # gettext and png are statically linked on win64
504 FILES ${LIBDIR}/zlib/lib/zlib.dll
505 DESTINATION ${TARGETDIR}
510 ${LIBDIR}/png/lib/libpng.dll
511 ${LIBDIR}/zlib/lib/zlib.dll
512 DESTINATION ${TARGETDIR}
518 FILES ${LIBDIR}/pthreads/lib/pthreadVC2.dll
519 DESTINATION ${TARGETDIR}
523 FILES ${LIBDIR}/pthreads/lib/pthreadGC2.dll
524 DESTINATION ${TARGETDIR}
528 if(WITH_CODEC_FFMPEG)
531 ${LIBDIR}/ffmpeg/lib/avcodec-53.dll
532 ${LIBDIR}/ffmpeg/lib/avformat-53.dll
533 ${LIBDIR}/ffmpeg/lib/avdevice-53.dll
534 ${LIBDIR}/ffmpeg/lib/avutil-51.dll
535 ${LIBDIR}/ffmpeg/lib/swscale-2.dll
536 DESTINATION ${TARGETDIR}
541 if(WITH_CODEC_SNDFILE)
543 FILES ${LIBDIR}/sndfile/lib/libsndfile-1.dll
544 DESTINATION ${TARGETDIR}
551 ${LIBDIR}/openal/lib/OpenAL32.dll
552 ${LIBDIR}/openal/lib/wrap_oal.dll
553 DESTINATION ${TARGETDIR}
560 FILES ${LIBDIR}/sdl/lib/SDL.dll
561 DESTINATION ${TARGETDIR}
568 FILES ${LIBDIR}/thumbhandler/lib/BlendThumb.dll
569 DESTINATION ${TARGETDIR}
573 install( # x86 builds can run on x64 Windows, so this is required at all times
574 FILES ${LIBDIR}/thumbhandler/lib/BlendThumb64.dll
575 DESTINATION ${TARGETDIR}
581 ${LIBDIR}/openimageio/bin/OpenImageIO.dll
582 DESTINATION ${TARGETDIR}
587 set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app)
588 set(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
589 set(TARGETDIR_VER ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION})
592 execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BLENDER_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
594 set_target_properties(blender PROPERTIES
595 MACOSX_BUNDLE_INFO_PLIST ${SOURCEINFO}
596 MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION}
597 MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION} ${BLENDER_DATE}")
599 # important to make a clean install each time else old scripts get loaded.
602 "file(REMOVE_RECURSE ${TARGETDIR_VER})"
605 # message after building.
607 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
608 COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${TARGETDIR_VER}'
611 # handy install macro to exclude files, we use \$ escape for the "to"
612 # argument when calling so ${BUILD_TYPE} does not get expanded
613 macro(install_dir from to)
617 PATTERN ".svn" EXCLUDE
618 PATTERN "*.pyc" EXCLUDE
619 PATTERN "*.pyo" EXCLUDE
620 PATTERN "*.orig" EXCLUDE
621 PATTERN "*.rej" EXCLUDE
622 PATTERN "__pycache__" EXCLUDE
623 PATTERN "__MACOSX" EXCLUDE
624 PATTERN ".DS_Store" EXCLUDE
628 # install release and app files
630 FILES ${BLENDER_TEXT_FILES}
631 DESTINATION ${TARGETDIR}
635 FILES ${SOURCEDIR}/Contents/PkgInfo
636 DESTINATION ${TARGETDIR}/blender.app/Contents
640 ${SOURCEDIR}/Contents/Resources
641 \${TARGETDIR}/blender.app/Contents/
645 if(WITH_INTERNATIONAL)
648 ${CMAKE_SOURCE_DIR}/release/datafiles/locale
649 ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
650 DESTINATION ${TARGETDIR_VER}/datafiles
651 PATTERN ".svn" EXCLUDE
657 # the python zip is first extract as part of the build process,
658 # and then later installed as part of make install. this is much
659 # quicker, and means we can easily exclude files on copy
662 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/python)
664 set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
667 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python
668 COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/python/
669 COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/python/
670 COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${CMAKE_CURRENT_BINARY_DIR}/python/
671 DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
673 add_dependencies(blender extractpyzip)
675 # copy extracted python files
677 ${CMAKE_CURRENT_BINARY_DIR}/python
683 ${CMAKE_SOURCE_DIR}/release/scripts
688 # install blenderplayer bundle - copy of blender.app above. re-using macros et al
689 # note we are using OSX Bundle as base and copying Blender dummy bundle on top of it
690 if(WITH_GAMEENGINE AND WITH_PLAYER)
691 set(PLAYER_SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blenderplayer.app)
692 set(PLAYER_SOURCEINFO ${PLAYER_SOURCEDIR}/Contents/Info.plist)
693 set(PLAYER_TARGETDIR_VER ${TARGETDIR}/blenderplayer.app/Contents/MacOS/${BLENDER_VERSION})
696 # important to make a clean install each time else old scripts get loaded.
699 "file(REMOVE_RECURSE ${PLAYER_TARGETDIR_VER})"
703 FILES ${PLAYER_SOURCEDIR}/Contents/PkgInfo
704 DESTINATION ${TARGETDIR}/blenderplayer.app/Contents
708 ${PLAYER_SOURCEDIR}/Contents/Resources
709 \${TARGETDIR}/blenderplayer.app/Contents/
715 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python
716 COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/python/
717 COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/python/
718 COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${CMAKE_CURRENT_BINARY_DIR}/python/
719 DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
721 # copy extracted python files
723 ${CMAKE_CURRENT_BINARY_DIR}/python
724 \${PLAYER_TARGETDIR_VER}
731 # install more files specified elsewhere
732 delayed_do_install(${TARGETDIR_VER})
734 unset(BLENDER_TEXT_FILES)
737 # -----------------------------------------------------------------------------
740 add_dependencies(blender makesdna)
742 get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
744 set(BLENDER_LINK_LIBS
751 list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
755 list(APPEND BLENDER_LINK_LIBS
766 set(BLENDER_SORTED_LIBS
770 bf_editor_space_action
771 bf_editor_space_buttons
772 bf_editor_space_console
774 bf_editor_space_graph
775 bf_editor_space_image
777 bf_editor_space_logic
780 bf_editor_space_outliner
781 bf_editor_space_script
782 bf_editor_space_sequencer
784 bf_editor_space_userpref
785 bf_editor_space_view3d
802 bf_editor_sculpt_paint
835 bf_intern_guardedalloc
846 extern_recastnavigation
856 ge_logic_loopbacknetwork
876 list(APPEND BLENDER_SORTED_LIBS extern_libmv)
879 if(WITH_MOD_CLOTH_ELTOPO)
880 list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
883 if(WITH_BUILTIN_GLEW)
884 list(APPEND BLENDER_SORTED_LIBS extern_glew)
888 list(APPEND BLENDER_SORTED_LIBS extern_binreloc)
891 if(WITH_CXX_GUARDEDALLOC)
892 list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
896 list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
899 if(WITH_CODEC_QUICKTIME)
900 list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
903 foreach(SORTLIB ${BLENDER_SORTED_LIBS})
904 set(REMLIB ${SORTLIB})
905 foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
906 if(${SEARCHLIB} STREQUAL ${SORTLIB})
911 # message(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
912 list(APPEND REM_MSG ${REMLIB})
913 list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
918 message(STATUS "Blender Skipping: (${REM_MSG})")
920 target_link_libraries(blender ${BLENDER_SORTED_LIBS})
928 # target_link_libraries(blender ${BLENDER_LINK_LIBS})
931 setup_liblinks(blender)