svn merge -r40166:40279 ^/trunk/blender
[blender.git] / source / creator / CMakeLists.txt
index c88563a990a36e556e18ffb138b384fdbad51332..22fe0a1a1d1f2ab465675dba64a54caf71315518 100644 (file)
@@ -25,9 +25,6 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-# So BUILDINFO and BLENDERPATH strings are automatically quoted
-cmake_policy(SET CMP0005 NEW)
-
 setup_libdirs()
 
 blender_include_dirs(
@@ -136,6 +133,7 @@ if(WIN32 AND NOT UNIX)
 endif()
 
 if(WITH_BUILDINFO)
+       add_definitions(-DWITH_BUILDINFO)
        # --------------------------------------------------------------------------
        # These defines could all be moved into the header below
        string(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}")
@@ -231,7 +229,17 @@ else()
        set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH})
 endif()
 
-# install target
+
+# -----------------------------------------------------------------------------
+# Install Targets
+
+set(BLENDER_TEXT_FILES
+       ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
+       ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
+       ${CMAKE_SOURCE_DIR}/release/text/copyright.txt
+       ${CMAKE_SOURCE_DIR}/release/text/readme.html
+)
+
 if(UNIX AND NOT APPLE)
 
        if(WITH_INSTALL_PORTABLE)
@@ -274,9 +282,8 @@ if(UNIX AND NOT APPLE)
                )
 
                install(
-                       DIRECTORY ${CMAKE_SOURCE_DIR}/release/text
+                       FILES ${BLENDER_TEXT_FILES}
                        DESTINATION ${TARGETDIR}
-                       PATTERN ".svn" EXCLUDE
                )
 
        else()
@@ -332,21 +339,20 @@ if(UNIX AND NOT APPLE)
                        DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
                )
                install(
-                       DIRECTORY ${CMAKE_SOURCE_DIR}/release/text
+                       FILES ${BLENDER_TEXT_FILES}
                        DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender
-                       PATTERN ".svn" EXCLUDE
                )
        endif()
 
        install(
                FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
-               DESTINATION ${TARGETDIR_VER}/config
+               DESTINATION ${TARGETDIR_VER}
        )
 
        if(WITH_INTERNATIONAL)
                install(
                        FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
-                       DESTINATION ${TARGETDIR_VER}/config
+                       DESTINATION ${TARGETDIR_VER}
                )
 
                install(
@@ -409,20 +415,19 @@ elseif(WIN32)
        )
 
        install(  # same as linux!, deduplicate
-               DIRECTORY ${CMAKE_SOURCE_DIR}/release/text
+               FILES ${BLENDER_TEXT_FILES}
                DESTINATION ${TARGETDIR}
-               PATTERN ".svn" EXCLUDE
        )
 
        install(  # same as linux!, deduplicate
                FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
-               DESTINATION ${TARGETDIR_VER}/config
+               DESTINATION ${TARGETDIR_VER}
        )
 
        if(WITH_INTERNATIONAL) # same as linux!, deduplicate
                install(
                        FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
-                       DESTINATION ${TARGETDIR_VER}/config
+                       DESTINATION ${TARGETDIR_VER}
                )
                install(
                        DIRECTORY ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
@@ -430,12 +435,12 @@ elseif(WIN32)
                        PATTERN ".svn" EXCLUDE
                )
 
-               if(NOT CMAKE_CL_64)
-                       install(
-                               FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
-                               DESTINATION ${TARGETDIR}
-                       )
+               install(
+                       FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
+                       DESTINATION ${TARGETDIR}
+               )
 
+               if(NOT CMAKE_CL_64)
                        install(
                                FILES ${LIBDIR}/iconv/lib/iconv.dll
                                DESTINATION ${TARGETDIR}
@@ -540,11 +545,11 @@ elseif(WIN32)
        if(WITH_CODEC_FFMPEG)
                install(
                        FILES
-                               ${LIBDIR}/ffmpeg/lib/avcodec-52.dll
-                               ${LIBDIR}/ffmpeg/lib/avformat-52.dll
-                               ${LIBDIR}/ffmpeg/lib/avdevice-52.dll
-                               ${LIBDIR}/ffmpeg/lib/avutil-50.dll
-                               ${LIBDIR}/ffmpeg/lib/swscale-0.dll
+                               ${LIBDIR}/ffmpeg/lib/avcodec-53.dll
+                               ${LIBDIR}/ffmpeg/lib/avformat-53.dll
+                               ${LIBDIR}/ffmpeg/lib/avdevice-53.dll
+                               ${LIBDIR}/ffmpeg/lib/avutil-51.dll
+                               ${LIBDIR}/ffmpeg/lib/swscale-2.dll
                        DESTINATION ${TARGETDIR}
                )
 
@@ -630,9 +635,9 @@ elseif(APPLE)
        endmacro()
 
        # install release and app files
-       install_dir(
-               ${CMAKE_SOURCE_DIR}/release/text/
-               \${TARGETDIR}
+       install(
+               FILES ${BLENDER_TEXT_FILES}
+               DESTINATION ${TARGETDIR}
        )
 
        install(
@@ -647,7 +652,7 @@ elseif(APPLE)
 
        install(
                FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
-               DESTINATION ${TARGETDIR_VER}/datafiles
+               DESTINATION ${TARGETDIR_VER}
        )
 
        # localization
@@ -697,17 +702,26 @@ elseif(APPLE)
        endif()
 endif()
 
+unset(BLENDER_TEXT_FILES)
+
+
+# -----------------------------------------------------------------------------
+# Setup link libs
+
 add_dependencies(blender makesdna)
 
 get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
 
-set(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_render)
+set(BLENDER_LINK_LIBS
+       ${BLENDER_LINK_LIBS}
+       bf_windowmanager
+       bf_render
+)
 
 if(WITH_MOD_FLUID)
        list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
 endif()
 
-
 #if(UNIX)
        # Sort libraries
        set(BLENDER_SORTED_LIBS
@@ -755,6 +769,7 @@ endif()
                bf_intern_opennl
                bf_python
                bf_python_ext
+               bf_python_mathutils
                bf_ikplugin
                bf_bmesh
                bf_modifiers
@@ -788,6 +803,7 @@ endif()
                extern_minilzo
                extern_lzma
                ge_logic_ketsji
+               extern_recastnavigation
                ge_phys_common
                ge_logic
                ge_rasterizer
@@ -795,7 +811,6 @@ endif()
                ge_logic_expressions
                ge_scenegraph
                ge_logic_network
-               bf_python # duplicate for BPY_driver_exec
                ge_logic_ngnetwork
                extern_bullet
                ge_logic_loopbacknetwork