Merged changes in the trunk up to revision 52690.
[blender.git] / source / creator / CMakeLists.txt
index fb53dc1a25e768d1cedf3a4a294bb010053f27d1..67bf9599baf9886c51949c0d74672af208eca46d 100644 (file)
@@ -302,6 +302,15 @@ if(WITH_INTERNATIONAL)
        )
 endif()
 
+# color management
+if(WITH_OPENCOLORIO)
+       install(
+               DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/colormanagement
+               DESTINATION ${TARGETDIR_VER}/datafiles
+               PATTERN ".svn" EXCLUDE
+       )
+endif()
+
 # helpful tip when using make
 if("${CMAKE_GENERATOR}" MATCHES ".*Makefiles.*")
        # message after building.
@@ -461,30 +470,19 @@ elseif(WIN32)
                DESTINATION ${TARGETDIR}
        )
 
-       if(WITH_INTERNATIONAL AND (NOT WITH_MINGW64))
-               install(
-                       FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
-                       DESTINATION ${TARGETDIR}
-               )
+       if(WITH_PYTHON)
+               set_lib_path(PYLIB "python")
 
-               if(NOT CMAKE_CL_64)
-                       install(
-                               FILES ${LIBDIR}/iconv/lib/iconv.dll
-                               DESTINATION ${TARGETDIR}
-                       )
-               endif()
-       endif()
+               STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
 
-       if(WITH_PYTHON)
-               set_lib_path(PYLIB "python/lib")
                install(
-                       FILES ${PYLIB}/python32.dll
+                       FILES ${PYLIB}/lib/python${_PYTHON_VERSION_NO_DOTS}.dll
                        DESTINATION ${TARGETDIR}
                        CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
                )
 
                install(
-                       FILES ${PYLIB}/python32_d.dll
+                       FILES ${PYLIB}/lib/python${_PYTHON_VERSION_NO_DOTS}_d.dll
                        DESTINATION ${TARGETDIR}
                        CONFIGURATIONS Debug
                )
@@ -508,10 +506,10 @@ elseif(WIN32)
                                "
                                if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" STREQUAL \"Debug\")
                                        execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
-                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32_d.tar.gz\")
+                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_d.tar.gz\")
                                else()
                                        execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
-                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
+                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}.tar.gz\")
                                endif()
                                "
                        )
@@ -519,10 +517,12 @@ elseif(WIN32)
                        # doesnt work, todo
                        # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
                endif()
+
+               unset(_PYTHON_VERSION_NO_DOTS)
        endif()
 
        if(CMAKE_CL_64)
-               # gettext and png are statically linked on win64
+               # png is statically linked on win64
                install(
                        FILES ${LIBDIR}/zlib/lib/zlib.dll
                        DESTINATION ${TARGETDIR}
@@ -552,9 +552,20 @@ elseif(WIN32)
                        )
                elseif(WITH_MINGW64)
                        install(
-                               FILES ${LIBDIR}/binaries/pthreadGC2-w64.dll
+                               FILES 
+                                       ${LIBDIR}/binaries/libgcc_s_sjlj-1.dll
+                                       ${LIBDIR}/binaries/libwinpthread-1.dll
+                                       ${LIBDIR}/binaries/libstdc++-6.dll
                                DESTINATION ${TARGETDIR}
                        )
+                       
+                       if(WITH_OPENMP)
+                               install(
+                                       FILES 
+                                       ${LIBDIR}/binaries/libgomp-1.dll
+                                       DESTINATION ${TARGETDIR}
+                               )
+                       endif()
                endif()
        endif()
 
@@ -613,14 +624,20 @@ elseif(WIN32)
        install( # x86 builds can run on x64 Windows, so this is required at all times
                FILES ${LIBDIR}/thumbhandler/lib/BlendThumb64.dll
                DESTINATION ${TARGETDIR}
-       )       
+       )
 
-       if(WITH_OPENIMAGEIO)
+       if(WITH_OPENCOLORIO)
+               set(OCIOBIN ${LIBDIR}/opencolorio/bin)
                if(NOT MINGW)
-                       set_lib_path(OIIOBIN "openimageio/bin")
                        install(
                                FILES
-                                       ${OIIOBIN}/OpenImageIO.dll
+                                       ${OCIOBIN}/OpenColorIO.dll
+                               DESTINATION ${TARGETDIR}
+                       )
+               else()
+                       install(
+                               FILES
+                                       ${OCIOBIN}/libOpenColorIO.dll
                                DESTINATION ${TARGETDIR}
                        )
                endif()
@@ -645,7 +662,7 @@ elseif(APPLE)
                )
        endmacro()
 
-       set(OSX_APP_SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app)
+       set(OSX_APP_SOURCEDIR ${CMAKE_SOURCE_DIR}/release/darwin/blender.app)
 
        # setup Info.plist
        execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BLENDER_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -700,11 +717,11 @@ elseif(APPLE)
                )
 
        endif()
-
+       
        # install blenderplayer bundle - copy of blender.app above. re-using macros et al
        # note we are using OSX Bundle as base and copying Blender dummy bundle on top of it
        if(WITH_GAMEENGINE AND WITH_PLAYER)
-               set(OSX_APP_PLAYER_SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blenderplayer.app)
+               set(OSX_APP_PLAYER_SOURCEDIR ${CMAKE_SOURCE_DIR}/release/darwin/blenderplayer.app)
                set(PLAYER_SOURCEINFO ${OSX_APP_PLAYER_SOURCEDIR}/Contents/Info.plist)
                set(PLAYER_TARGETDIR_VER ${TARGETDIR}/blenderplayer.app/Contents/MacOS/${BLENDER_VERSION})
 
@@ -742,6 +759,7 @@ elseif(APPLE)
                endif()
 
        endif()
+               
 endif()
 
 # -----------------------------------------------------------------------------
@@ -780,6 +798,9 @@ if(WITH_CYCLES)
                cycles_kernel
                cycles_util
                cycles_subd)
+       if(WITH_CYCLES_OSL)
+               list(APPEND BLENDER_LINK_LIBS cycles_kernel_osl)
+       endif()
 endif()
 
 #if(UNIX)
@@ -851,10 +872,7 @@ endif()
                bf_imbuf_dds
                bf_collada
                bf_intern_bsp
-               bf_intern_bop
-               bf_intern_decimate
                bf_intern_elbeem
-               bf_intern_ik
                bf_intern_memutil
                bf_intern_guardedalloc
                bf_intern_ctr
@@ -897,12 +915,13 @@ endif()
                cycles_util
                cycles_subd
                bf_intern_raskter
+               bf_intern_opencolorio
        )
 
        if(WITH_COMPOSITOR)
-               #added for opencl compositor
-               list(APPEND BLENDER_SORTED_LIBS bf_compositor)
-               list(APPEND BLENDER_SORTED_LIBS bf_opencl)
+               # added for opencl compositor
+               list_insert_before(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_compositor")
+               list_insert_after(BLENDER_SORTED_LIBS "bf_compositor" "bf_opencl")
        endif()
 
        if(WITH_LIBMV)
@@ -926,6 +945,10 @@ endif()
                list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
        endif()
 
+       if(WITH_IK_SOLVER)
+               list_insert_after(BLENDER_SORTED_LIBS "bf_intern_elbeem" "bf_intern_iksolver")
+       endif()
+
        if(WITH_IK_ITASC)
                list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
        endif()
@@ -934,7 +957,7 @@ endif()
                list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
        endif()
 
-       if(WITH_CARVE)
+       if(WITH_MOD_BOOLEAN)
                list(APPEND BLENDER_SORTED_LIBS extern_carve)
        endif()
 
@@ -942,6 +965,14 @@ endif()
                list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
        endif()
 
+       if(WITH_CYCLES_OSL)
+               list_insert_after(BLENDER_SORTED_LIBS "cycles_kernel" "cycles_kernel_osl")
+       endif()
+
+       if(WITH_INTERNATIONAL)
+               list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
+       endif()
+
        foreach(SORTLIB ${BLENDER_SORTED_LIBS})
                set(REMLIB ${SORTLIB})
                foreach(SEARCHLIB ${BLENDER_LINK_LIBS})