se BLI_snprintf() for msvc compat, cleanup CMake file, some bad comments left in.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 7 Mar 2011 03:57:04 +0000 (03:57 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 7 Mar 2011 03:57:04 +0000 (03:57 +0000)
also on only try build RPM's on linux.

build_files/cmake/packaging.cmake
source/blender/gpu/intern/gpu_extensions.c
source/creator/CMakeLists.txt

index d3864e2fc1b8947c52778d1c71c2c6d783d12ab0..0304cd372df6a6b00cc0336898a0231cea44ee42 100644 (file)
@@ -33,14 +33,16 @@ set(BUILD_REV ${MY_WC_REVISION})
 # Force Package Name
 set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
 
 # Force Package Name
 set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
 
-# RPM packages
-include(build_files/cmake/RpmBuild.cmake)
-if(RPMBUILD_FOUND AND NOT WIN32)
-       set(CPACK_GENERATOR "RPM")
-       set(CPACK_SET_DESTDIR TRUE)
-       set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
-       set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
-       set(CPACK_RPM_PACKAGE_GROUP "Amusements/Graphics")
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+       # RPM packages
+       include(build_files/cmake/RpmBuild.cmake)
+       if(RPMBUILD_FOUND AND NOT WIN32)
+               set(CPACK_GENERATOR "RPM")
+               set(CPACK_SET_DESTDIR TRUE)
+               set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
+               set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
+               set(CPACK_RPM_PACKAGE_GROUP "Amusements/Graphics")
+       endif()
 endif()
 
 # Mac Bundle
 endif()
 
 # Mac Bundle
index c5cfbea9b5c0e7e4757550afebe0cb2c9e09e01d..453eb99511311cf4aaa45883c7233d0299bc94d5 100644 (file)
@@ -258,16 +258,13 @@ static void GPU_print_framebuffer_error(GLenum status, char err_out[256])
        }
 
        if(err_out) {
        }
 
        if(err_out) {
-               snprintf(err_out, 256, "GPUFrameBuffer: framebuffer incomplete error %d '%s'",
-                       (int)status,
-                       err);
+               BLI_snprintf(err_out, 256, "GPUFrameBuffer: framebuffer incomplete error %d '%s'",
+                       (int)status, err);
        }
        else {
                fprintf(stderr, "GPUFrameBuffer: framebuffer incomplete error %d '%s'\n",
        }
        else {
                fprintf(stderr, "GPUFrameBuffer: framebuffer incomplete error %d '%s'\n",
-                       (int)status,
-                       err);
+                       (int)status, err);
        }
        }
-
 }
 
 /* GPUTexture */
 }
 
 /* GPUTexture */
@@ -349,7 +346,7 @@ static GPUTexture *GPU_texture_create_nD(int w, int h, int n, float *fpixels, in
 
        if (!tex->bindcode) {
                if(err_out) {
 
        if (!tex->bindcode) {
                if(err_out) {
-                       snprintf(err_out, 256, "GPUTexture: texture create failed: %d",
+                       BLI_snprintf(err_out, 256, "GPUTexture: texture create failed: %d",
                                (int)glGetError());
                }
                else {
                                (int)glGetError());
                }
                else {
index 6d7d0fe4db50200c4c30472fbdabaad1832aafbe..ba366c0ee5187d51ca21f7d404bf322bd6465955 100644 (file)
@@ -148,7 +148,7 @@ if(WITH_BUILDINFO)
        set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/buildinfo.h
                PROPERTIES GENERATED TRUE
                HEADER_FILE_ONLY TRUE)
        set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/buildinfo.h
                PROPERTIES GENERATED TRUE
                HEADER_FILE_ONLY TRUE)
-               
+
        # add deps below, after adding blender
        # -------------- done with header values.
 
        # add deps below, after adding blender
        # -------------- done with header values.
 
@@ -356,6 +356,11 @@ if(WITH_INSTALL)
                                PATTERN ".svn" EXCLUDE
                        )
 
                                PATTERN ".svn" EXCLUDE
                        )
 
+                       install(
+                               FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
+                               DESTINATION ${TARGETDIR}/
+                       )
+
                        if(NOT CMAKE_CL_64)
                                install(
                                        FILES ${LIBDIR}/iconv/lib/iconv.dll
                        if(NOT CMAKE_CL_64)
                                install(
                                        FILES ${LIBDIR}/iconv/lib/iconv.dll
@@ -427,8 +432,6 @@ if(WITH_INSTALL)
                                        "
                                )
 
                                        "
                                )
 
-                               # TODO, debug
-
                                # doesnt work, todo
                                # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
                        endif()
                                # doesnt work, todo
                                # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
                        endif()
@@ -443,7 +446,6 @@ if(WITH_INSTALL)
                else()
                        install(
                                FILES
                else()
                        install(
                                FILES
-                               ${LIBDIR}/gettext/lib/gnu_gettext.dll # TODO INTERNATIONAL ONLY!
                                ${LIBDIR}/png/lib/libpng.dll
                                ${LIBDIR}/zlib/lib/zlib.dll
                                DESTINATION ${TARGETDIR}/
                                ${LIBDIR}/png/lib/libpng.dll
                                ${LIBDIR}/zlib/lib/zlib.dll
                                DESTINATION ${TARGETDIR}/
@@ -472,7 +474,7 @@ if(WITH_INSTALL)
                                ${LIBDIR}/ffmpeg/lib/swscale-0.dll
                                DESTINATION ${TARGETDIR}/
                        )
                                ${LIBDIR}/ffmpeg/lib/swscale-0.dll
                                DESTINATION ${TARGETDIR}/
                        )
-                       
+
                endif()
 
                if(WITH_CODEC_SNDFILE)
                endif()
 
                if(WITH_CODEC_SNDFILE)
@@ -518,7 +520,7 @@ if(WITH_INSTALL)
                        COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/
                        COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/
                )
                        COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/
                        COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/
                )
-         
+
                if(WITH_INTERNATIONAL)
                        add_custom_command(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                if(WITH_INTERNATIONAL)
                        add_custom_command(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
@@ -526,7 +528,7 @@ if(WITH_INSTALL)
                                COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/
                        )
                endif()
                                COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/
                        )
                endif()
-         
+
                if(WITH_PYTHON)
                        set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
                        add_custom_command(
                if(WITH_PYTHON)
                        set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
                        add_custom_command(
@@ -537,10 +539,10 @@ if(WITH_INSTALL)
                                COMMAND find ${TARGETDIR}/blender.app -name '*.py[co]' -prune -exec rm -rf {} '\;'
                                COMMAND find ${TARGETDIR}/blender.app -name '__pycache__' -exec rmdir {} '+'
                        )
                                COMMAND find ${TARGETDIR}/blender.app -name '*.py[co]' -prune -exec rm -rf {} '\;'
                                COMMAND find ${TARGETDIR}/blender.app -name '__pycache__' -exec rmdir {} '+'
                        )
-               endif()   
-       
+               endif()
+
                add_custom_command(
                add_custom_command(
-                       TARGET blender POST_BUILD MAIN_DEPENDENCY blender       
+                       TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                        COMMAND find ${TARGETDIR}/blender.app -name .DS_Store -prune -exec rm -rf {} "\;"
                        COMMAND find ${TARGETDIR}/blender.app -name .svn -prune -exec rm -rf {} "\;"
                        COMMAND find ${TARGETDIR}/blender.app -name __MACOSX -prune -exec rm -rf {} "\;"
                        COMMAND find ${TARGETDIR}/blender.app -name .DS_Store -prune -exec rm -rf {} "\;"
                        COMMAND find ${TARGETDIR}/blender.app -name .svn -prune -exec rm -rf {} "\;"
                        COMMAND find ${TARGETDIR}/blender.app -name __MACOSX -prune -exec rm -rf {} "\;"
@@ -603,10 +605,10 @@ endif()
                bf_editor_animation
                bf_editor_datafiles
 
                bf_editor_animation
                bf_editor_datafiles
 
-               bf_render 
-               bf_intern_opennl 
-               bf_python 
-               bf_python_ext 
+               bf_render
+               bf_intern_opennl
+               bf_python
+               bf_python_ext
                bf_ikplugin
                bf_modifiers
                bf_blenkernel
                bf_ikplugin
                bf_modifiers
                bf_blenkernel
@@ -616,44 +618,44 @@ endif()
                bf_blenlib
                bf_intern_ghost
                bf_intern_string
                bf_blenlib
                bf_intern_ghost
                bf_intern_string
-               bf_blenpluginapi 
-               bf_imbuf 
-               bf_avi 
-               bf_imbuf_cineon 
-               bf_imbuf_openexr 
+               bf_blenpluginapi
+               bf_imbuf
+               bf_avi
+               bf_imbuf_cineon
+               bf_imbuf_openexr
                bf_imbuf_dds
                bf_readblenfile
                bf_collada
                bf_imbuf_dds
                bf_readblenfile
                bf_collada
-               bf_intern_bsp 
-               bf_intern_bop 
-               bf_gen_system 
-               bf_intern_decimate 
-               bf_intern_elbeem 
-               bf_intern_ik 
-               bf_intern_memutil 
-               bf_intern_guardedalloc 
-               bf_intern_ctr 
-               ge_blen_routines 
-               ge_converter 
+               bf_intern_bsp
+               bf_intern_bop
+               bf_gen_system
+               bf_intern_decimate
+               bf_intern_elbeem
+               bf_intern_ik
+               bf_intern_memutil
+               bf_intern_guardedalloc
+               bf_intern_ctr
+               ge_blen_routines
+               ge_converter
                ge_phys_dummy
                ge_phys_dummy
-               ge_phys_bullet 
+               ge_phys_bullet
                bf_intern_smoke
                extern_minilzo
                extern_lzma
                bf_intern_smoke
                extern_minilzo
                extern_lzma
-               ge_logic_ketsji 
+               ge_logic_ketsji
                ge_phys_common
                ge_phys_common
-               ge_logic 
-               ge_rasterizer 
-               ge_oglrasterizer 
-               ge_logic_expressions 
-               ge_scenegraph 
-               ge_logic_network 
+               ge_logic
+               ge_rasterizer
+               ge_oglrasterizer
+               ge_logic_expressions
+               ge_scenegraph
+               ge_logic_network
                bf_gen_system
                bf_python # duplicate for BPY_driver_exec
                bf_gen_system
                bf_python # duplicate for BPY_driver_exec
-               ge_logic_ngnetwork 
-               extern_bullet 
-               ge_logic_loopbacknetwork 
-               bf_intern_moto 
+               ge_logic_ngnetwork
+               extern_bullet
+               ge_logic_loopbacknetwork
+               bf_intern_moto
                extern_glew
                extern_openjpeg
                extern_redcode
                extern_glew
                extern_openjpeg
                extern_redcode