Merging r46495 through r46557 from trunk into soc-2011-tomato
[blender-staging.git] / source / creator / CMakeLists.txt
index b39d2a5b5c2fbe000b51fcb65b3e7c68b181f05d..a689dfb1db1d2631f49a319ab8807a32bfc10778 100644 (file)
@@ -40,11 +40,19 @@ blender_include_dirs(
        ../blender/windowmanager
 )
 
+if(WIN32)
+       blender_include_dirs(../../intern/utfconv)
+endif()
+
 if(WITH_LIBMV)
        blender_include_dirs(../../extern/libmv)
        add_definitions(-DWITH_LIBMV)
 endif()
 
+if(WITH_CODEC_FFMPEG)
+       add_definitions(-DWITH_FFMPEG)
+endif()
+
 if(WITH_PYTHON)
        blender_include_dirs(../blender/python)
        add_definitions(-DWITH_PYTHON)
@@ -226,7 +234,7 @@ set(BLENDER_TEXT_FILES
 
 
 # -----------------------------------------------------------------------------
-# Platform Spesific Var: TARGETDIR_VER
+# Platform Specific Var: TARGETDIR_VER
 
 if(UNIX AND NOT APPLE)
        if(WITH_INSTALL_PORTABLE)
@@ -388,7 +396,7 @@ if(UNIX AND NOT APPLE)
                )
        endif()
 
-               # plugins in blender 2.5 don't work at the moment.
+               # plugins in blender 2.6 don't work at the moment.
                #
                # install(
                #       DIRECTORY ${CMAKE_SOURCE_DIR}/release/plugins
@@ -430,7 +438,28 @@ if(UNIX AND NOT APPLE)
 
                        # # doesnt work, todo
                        # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
+                       
+                       if(WITH_PYTHON_INSTALL_NUMPY)
+                               install(
+                                       DIRECTORY ${PYTHON_NUMPY_PATH}/numpy
+                                       DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/site-packages
+                                       PATTERN ".svn" EXCLUDE
+                                       PATTERN "__pycache__" EXCLUDE           # * any cache *
+                                       PATTERN "*.pyc" EXCLUDE                 # * any cache *
+                                       PATTERN "*.pyo" EXCLUDE                 # * any cache *
+                                       PATTERN "distutils" EXCLUDE             # ./distutils
+                                       PATTERN "oldnumeric" EXCLUDE            # ./oldnumeric
+                                       PATTERN "doc" EXCLUDE                   # ./doc
+                                       PATTERN "tests" EXCLUDE                 # ./tests
+                                       PATTERN "f2py" EXCLUDE                  # ./f2py - fortran/python interface code, not fun for blender devs.
+                                       PATTERN "include" EXCLUDE               # include dirs all over, we wont use NumPy/CAPI
+                                       PATTERN "*.h" EXCLUDE                   # some includes are not in include dirs
+                                       PATTERN "*.a" EXCLUDE                   # ./core/lib/libnpymath.a - for linking, we dont need.
+                               )
+                       endif()
+                       
                        unset(_target_LIB)
+                       
                endif()
        endif()
 elseif(WIN32)
@@ -440,7 +469,7 @@ elseif(WIN32)
                DESTINATION ${TARGETDIR}
        )
 
-       if(WITH_INTERNATIONAL)
+       if(WITH_INTERNATIONAL AND (NOT WITH_MINGW64))
                install(
                        FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
                        DESTINATION ${TARGETDIR}
@@ -454,7 +483,7 @@ elseif(WIN32)
                endif()
        endif()
 
-       # plugins in blender 2.5 don't work at the moment.
+       # plugins in blender 2.6 don't work at the moment.
        #
        # install(
        #       DIRECTORY ${CMAKE_SOURCE_DIR}/release/plugins
@@ -515,11 +544,14 @@ elseif(WIN32)
                        DESTINATION ${TARGETDIR}
                )
        else()
-               install(
-                       FILES
-                               ${LIBDIR}/zlib/lib/zlib.dll
-                       DESTINATION ${TARGETDIR}
-               )
+               #not needed since we link statically, maybe also unneeded for MinGW?
+               if(NOT WITH_MINGW64)
+                       install(
+                               FILES
+                                       ${LIBDIR}/zlib/lib/zlib.dll
+                               DESTINATION ${TARGETDIR}
+                       )
+               endif()
        endif()
 
        if(MSVC)
@@ -528,10 +560,18 @@ elseif(WIN32)
                        DESTINATION ${TARGETDIR}
                )
        else()
-               install(
-                       FILES ${LIBDIR}/pthreads/lib/pthreadGC2.dll
-                       DESTINATION ${TARGETDIR}
-               )
+               #MinGW64 comes with own version. For portable builds it will probaly have to be copied to work
+               if(NOT WITH_MINGW64)
+                       install(
+                               FILES ${LIBDIR}/pthreads/lib/pthreadGC2.dll
+                               DESTINATION ${TARGETDIR}
+                       )
+               elseif(WITH_MINGW64)
+                       install(
+                               FILES ${LIBDIR}/binaries/pthreadGC2-w64.dll
+                               DESTINATION ${TARGETDIR}
+                       )
+               endif()
        endif()
 
        if(WITH_CODEC_FFMPEG)
@@ -544,7 +584,14 @@ elseif(WIN32)
                                ${LIBDIR}/ffmpeg/lib/swscale-2.dll
                        DESTINATION ${TARGETDIR}
                )
-
+               if(WITH_MINGW64)
+               install(
+                       FILES
+                               ${LIBDIR}/ffmpeg/lib/swresample-0.dll
+                               ${LIBDIR}/ffmpeg/lib/xvidcore.dll
+                       DESTINATION ${TARGETDIR}
+               )
+               endif()
        endif()
 
        if(WITH_CODEC_SNDFILE)
@@ -585,12 +632,14 @@ elseif(WIN32)
        )       
 
        if(WITH_OPENIMAGEIO)
-               set_lib_path(OIIOBIN "openimageio/bin")
-               install(
-                       FILES
-                               ${OIIOBIN}/OpenImageIO.dll
-                       DESTINATION ${TARGETDIR}
-               )
+               if(NOT MINGW)
+                       set_lib_path(OIIOBIN "openimageio/bin")
+                       install(
+                               FILES
+                                       ${OIIOBIN}/OpenImageIO.dll
+                               DESTINATION ${TARGETDIR}
+                       )
+               endif()
        endif()
 
 elseif(APPLE)
@@ -791,15 +840,17 @@ endif()
                bf_editor_sound
                bf_editor_animation
                bf_editor_datafiles
+               bf_editor_mask
 
                bf_render
                bf_intern_opennl
                bf_python
                bf_python_ext
                bf_python_mathutils
+               bf_python_bmesh
                bf_ikplugin
-               bf_bmesh
                bf_modifiers
+               bf_bmesh
                bf_blenkernel
                bf_nodes
                bf_gpu
@@ -822,6 +873,7 @@ endif()
                bf_intern_memutil
                bf_intern_guardedalloc
                bf_intern_ctr
+               bf_intern_utfconv
                ge_blen_routines
                ge_converter
                ge_phys_dummy
@@ -859,10 +911,12 @@ endif()
                cycles_kernel
                cycles_util
                cycles_subd
+               bf_intern_raskter
        )
 
        if(WITH_LIBMV)
                list(APPEND BLENDER_SORTED_LIBS extern_libmv)
+               list(APPEND BLENDER_SORTED_LIBS extern_ceres)
        endif()
 
        if(WITH_MOD_CLOTH_ELTOPO)