merge with trunk at r31523
[blender.git] / source / creator / CMakeLists.txt
index a3977ffb16b6a461989e41e0d93eb9e26b7743ff..e05b9d33a4a1c7b5613003d3a1a96a21661e8e6c 100644 (file)
@@ -53,13 +53,25 @@ IF(WITH_QUICKTIME)
        ADD_DEFINITIONS(-DWITH_QUICKTIME)
 ENDIF(WITH_QUICKTIME)
 
-IF(WITH_OPENEXR)
+IF(WITH_IMAGE_OPENEXR)
        ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_OPENEXR)
+ENDIF(WITH_IMAGE_OPENEXR)
 
-IF(WITH_TIFF)
+IF(WITH_IMAGE_TIFF)
        ADD_DEFINITIONS(-DWITH_TIFF)
-ENDIF(WITH_TIFF)
+ENDIF(WITH_IMAGE_TIFF)
+
+IF(WITH_IMAGE_DDS)
+       ADD_DEFINITIONS(-DWITH_DDS)
+ENDIF(WITH_IMAGE_DDS)
+
+IF(WITH_IMAGE_CINEON)
+       ADD_DEFINITIONS(-DWITH_CINEON)
+ENDIF(WITH_IMAGE_CINEON)
+
+IF(WITH_IMAGE_HDR)
+       ADD_DEFINITIONS(-DWITH_HDR)
+ENDIF(WITH_IMAGE_HDR)
 
 IF(WITH_PYTHON)
        INCLUDE_DIRECTORIES(../blender/python)
@@ -122,16 +134,16 @@ SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
                
                ADD_CUSTOM_COMMAND(
                        TARGET blender POST_BUILD MAIN_DEPENDENCY blender
-                       COMMAND rm -Rf ${TARGETDIR}/.blender
-                       COMMAND mkdir ${TARGETDIR}/.blender/
-                       COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/.blender/
+                       COMMAND rm -Rf ${TARGETDIR}/${BLENDER_VERSION}
+                       COMMAND mkdir ${TARGETDIR}/${BLENDER_VERSION}/
+                       COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf ${TARGETDIR}/${BLENDER_VERSION}/
                )
     
                IF(WITH_INTERNATIONAL)
                        ADD_CUSTOM_COMMAND(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
-                               COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/.blender/
-                               COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/.blender/
+                               COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages ${TARGETDIR}/${BLENDER_VERSION}/
+                               COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale ${TARGETDIR}/${BLENDER_VERSION}/
                        )
                ENDIF(WITH_INTERNATIONAL)
     
@@ -139,34 +151,34 @@ SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
                        ADD_CUSTOM_COMMAND(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                                COMMENT "copying blender scripts..."
-                               COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/.blender/
+                               COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/${BLENDER_VERSION}/
                                COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;"
                        )
-      
-                       # Copy the systems python into the install directory
-                       # Scons copy in tools/Blender.py
-                       ADD_CUSTOM_COMMAND(
-                               TARGET blender POST_BUILD MAIN_DEPENDENCY blender
-                               COMMENT "copying a subset of the systems python..."
-        
-                               COMMAND mkdir ${TARGETDIR}/.blender/python # PYTHONPATH and PYTHONHOME is set here
-                               COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
-                               COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
-        
-                               COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
-                               COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3
-                               COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/idlelib
-                               COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/tkinter
-                               COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/config
-        
-                               COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages
-                               COMMAND mkdir ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages    # python needs it.
-                               COMMAND rm -f ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib-dynload/_tkinter.so
-                               COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "test" -prune -exec rm -rf {} "\;"
-                               COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
-                               COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
-                       )
-     
+                       IF(WITH_PYTHON_INSTALL)
+                               # Copy the systems python into the install directory
+                               # Scons copy in tools/Blender.py
+                               ADD_CUSTOM_COMMAND(
+                                       TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+                                       COMMENT "copying a subset of the systems python..."
+                                       COMMAND mkdir ${TARGETDIR}/${BLENDER_VERSION}/python # PYTHONPATH and PYTHONHOME is set here
+                                       COMMAND mkdir ${TARGETDIR}/${BLENDER_VERSION}/python/lib/
+                                       COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/${BLENDER_VERSION}/python/lib/
+
+                                       COMMAND rm -rf ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION}/distutils
+                                       COMMAND rm -rf ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION}/lib2to3
+                                       COMMAND rm -rf ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION}/idlelib
+                                       COMMAND rm -rf ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION}/tkinter
+                                       COMMAND rm -rf ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION}/config
+
+                                       COMMAND rm -rf ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION}/site-packages
+                                       COMMAND mkdir ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION}/site-packages    # python needs it.
+
+                                       COMMAND rm -f ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION}/lib-dynload/_tkinter.so
+                                       COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION} -name "test" -prune -exec rm -rf {} "\;"
+                                       COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
+                                       COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
+                               )
+                       ENDIF(WITH_PYTHON_INSTALL)
                ENDIF(WITH_PYTHON)
       
                ADD_CUSTOM_COMMAND(
@@ -175,7 +187,7 @@ SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
                )
     
     
-               # Above we bundle a portable distrobution in ./bin
+               # Above we bundle a portable distribution in ./bin
                # This is an optional "make install" which installs blender on the system.
                INSTALL(
                        PROGRAMS ${TARGETDIR}/blender
@@ -196,6 +208,14 @@ SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
                INSTALL(
             FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/blender.svg
             DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps
+        )
+               INSTALL(
+                       PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py
+                       DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+               )
+               INSTALL(
+            FILES ${CMAKE_SOURCE_DIR}/doc/blender.1
+            DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
         )
                INSTALL(
             DIRECTORY ${CMAKE_SOURCE_DIR}/release/text/
@@ -206,10 +226,16 @@ SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
             DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/
             DESTINATION ${BLENDERPATH}/scripts
             PATTERN ".svn" EXCLUDE
+                       PATTERN "*.pyc" EXCLUDE
         )
+               INSTALL(
+                       DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/brushicons/
+                       DESTINATION ${BLENDERPATH}/datafiles/brushicons
+                       PATTERN ".svn" EXCLUDE
+               )
                IF(WITH_INTERNATIONAL)
                        INSTALL(
-               DIRECTORY ${CMAKE_SOURCE_DIR}/bin/.blender/locale/
+               DIRECTORY ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale/
                DESTINATION ${BLENDERPATH}/datafiles/locale
                PATTERN ".svn" EXCLUDE
                )
@@ -230,26 +256,22 @@ SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
                        COMMAND cat ${SOURCEINFO} | sed s/VERSION/`cat ${CMAKE_SOURCE_DIR}/release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO}
                        COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/datafiles
                        COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/datafiles/
-                       COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/datafiles/
+                       COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/datafiles/
                )
       
                IF(WITH_INTERNATIONAL)
                        ADD_CUSTOM_COMMAND(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
-                               COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/datafiles/
-                               COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/datafiles/
+                               COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/datafiles/
+                               COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/datafiles/
                        )
                ENDIF(WITH_INTERNATIONAL)
       
                IF(WITH_PYTHON)
-                       IF(WITH_LIBS10.5)
-                               SET(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
-                       ELSE(WITH_LIBS10.5)
-                               SET(PYTHON_ZIP "python.zip")
-                       ENDIF(WITH_LIBS10.5)
+                       SET(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
                        ADD_CUSTOM_COMMAND(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
-                               COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/blender.app/Contents/MacOS/scripts/
+                               COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/blender.app/Contents/MacOS/
                                COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/python/
                                COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/python/
                                COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${TARGETDIR}/blender.app/Contents/MacOS/python/
@@ -272,9 +294,9 @@ SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
                        COMMAND if not exist \"${TARGETDIR}\\.blender\\locale\" mkdir \"${TARGETDIR}\\.blender\\locale\"
                        COMMAND if not exist \"${TARGETDIR}\\.blender\\scripts\" mkdir \"${TARGETDIR}\\.blender\\scripts\"
                        COMMAND if not exist \"${TARGETDIR}\\plugins\" mkdir \"${TARGETDIR}\\plugins\"
-                       COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\.blender\\\" 
-                       COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" \"${TARGETDIR}\\.blender\\\"
-                       COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\.blender\\locale\"
+                       COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\release\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\.blender\\\" 
+                       COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\release\\bin\\.blender\\.bfont.ttf\" \"${TARGETDIR}\\.blender\\\"
+                       COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\release\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\.blender\\locale\"
                        COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\release\\scripts\\*.*\" \"${TARGETDIR}\\.blender\\scripts\"
                        COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\release\\plugins\\*.*\" \"${TARGETDIR}\\plugins\"
                        COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\"
@@ -354,9 +376,9 @@ FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
 
 SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager blender_render)
 
-IF(WITH_ELBEEM)
+IF(WITH_FLUID)
        SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} bf_elbeem)
-ENDIF(WITH_ELBEEM)
+ENDIF(WITH_FLUID)
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
        SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)