- use list append in more places (preferred method since its faster)
authorCampbell Barton <ideasman42@gmail.com>
Mon, 6 Sep 2010 10:15:41 +0000 (10:15 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 6 Sep 2010 10:15:41 +0000 (10:15 +0000)
- remove some unused include paths
- remove unused linux path define

12 files changed:
CMakeLists.txt
extern/binreloc/CMakeLists.txt
intern/audaspace/CMakeLists.txt
source/blender/avi/CMakeLists.txt
source/blender/blenfont/CMakeLists.txt
source/blender/blenkernel/CMakeLists.txt
source/blender/blenlib/CMakeLists.txt
source/blender/nodes/CMakeLists.txt
source/blender/nodes/intern/CMP_util.c
source/blender/windowmanager/CMakeLists.txt
source/creator/CMakeLists.txt
source/kernel/CMakeLists.txt

index 8e77188..0ca96fc 100644 (file)
@@ -300,7 +300,7 @@ IF(UNIX AND NOT APPLE)
 
        IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
                # BSD's dont use libdl.so
-               SET(LLIBS "${LLIBS} -ldl")
+               LIST(APPEND LLIBS -ldl)
 
                # binreloc is linux only
                SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
@@ -308,9 +308,9 @@ IF(UNIX AND NOT APPLE)
        ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
        IF(WITH_OPENMP)
-               SET(LLIBS "${LLIBS} -lgomp")
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
-               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
+               LIST(APPEND LLIBS -lgomp)
+               LIST(APPEND CMAKE_C_FLAGS -fopenmp)
+               LIST(APPEND CMAKE_CXX_FLAGS -fopenmp)
        ENDIF(WITH_OPENMP)
 
 
index 7bdc93f..c684a76 100644 (file)
@@ -23,4 +23,3 @@ ADD_DEFINITIONS(-DENABLE_BINRELOC)
 FILE(GLOB SRC *.c)
 
 BLENDERLIB(extern_binreloc "${SRC}" "${INC}")
-#, libtype=['core','player'], priority = [25,15] ) 
index b1ded10..5d73f95 100644 (file)
 #
 # ***** END LGPL LICENSE BLOCK *****
 
-SET(INC . intern FX SRC ${PTHREADS_INC} ${LIBSAMPLERATE_INC})
+SET(INC
+       .
+       intern
+       FX SRC
+       ${PTHREADS_INC}
+       ${LIBSAMPLERATE_INC}
+)
 
-FILE(GLOB SRC intern/*.cpp intern/*.h FX/*.cpp SRC/*.cpp)
+FILE(GLOB SRC
+       intern/*.cpp
+       intern/*.h
+       FX/*.cpp
+       SRC/*.cpp
+)
 
 IF(WITH_FFMPEG)
-       SET(INC ${INC} ffmpeg ${FFMPEG_INC})
+       LIST(APPEND INC ffmpeg)
+       LIST(APPEND INC ${FFMPEG_INC})
        FILE(GLOB FFMPEGSRC ffmpeg/*.cpp)
        ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
 IF(WITH_SDL)
-       SET(INC ${INC} SDL ${SDL_INCLUDE_DIR})
+       LIST(APPEND INC SDL)
+       LIST(APPEND INC ${SDL_INCLUDE_DIR})
        FILE(GLOB SDLSRC SDL/*.cpp)
        ADD_DEFINITIONS(-DWITH_SDL)
 ENDIF(WITH_SDL)
 
 IF(WITH_OPENAL)
-       SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR})
+       LIST(APPEND INC OpenAL)
+       LIST(APPEND INC ${OPENAL_INCLUDE_DIR})
        FILE(GLOB OPENALSRC OpenAL/*.cpp)
        ADD_DEFINITIONS(-DWITH_OPENAL)
 ENDIF(WITH_OPENAL)
 
 IF(WITH_JACK)
-       SET(INC ${INC} jack ${JACK_INC})
+       LIST(APPEND INC jack)
+       LIST(APPEND INC ${JACK_INC})
        FILE(GLOB JACKSRC jack/*.cpp)
        ADD_DEFINITIONS(-DWITH_JACK)
 ENDIF(WITH_JACK)
 
 IF(WITH_SNDFILE)
-       SET(INC ${INC} sndfile ${SNDFILE_INC})
+       LIST(APPEND INC sndfile)
+       LIST(APPEND INC ${SNDFILE_INC})
        FILE(GLOB SNDFILESRC sndfile/*.cpp)
        ADD_DEFINITIONS(-DWITH_SNDFILE)
 ENDIF(WITH_SNDFILE)
@@ -61,7 +77,8 @@ ENDIF(WITH_SNDFILE)
 #ENDIF(WITH_FFTW3)
 
 IF(WITH_PYTHON)
-       SET(INC ${INC} Python ${PYTHON_INC})
+       LIST(APPEND INC Python)
+       LIST(APPEND INC ${PYTHON_INC})
        FILE(GLOB PYTHONSRC Python/*.cpp)
 ELSE(WITH_PYTHON)
        ADD_DEFINITIONS(-DDISABLE_PYTHON)
index 5ef37f5..b1ddb8c 100644 (file)
@@ -27,7 +27,8 @@
 FILE(GLOB SRC intern/*.c)
 
 SET(INC 
-       . ../../../intern/guardedalloc
+       .
+       ../../../intern/guardedalloc
        ${JPEG_INC}
 )
 
index 8df4034..abaf769 100644 (file)
 
 FILE(GLOB SRC intern/*.c)
 
-SET(INC 
-       ../../../intern/guardedalloc ../blenlib ../makesdna ../editors/include
-       ../blenkernel ../../../extern/glew/include .
+SET(INC
+       .
+       ../blenlib
+       ../makesdna
+       ../editors/include
+       ../blenkernel
+       ../../../intern/guardedalloc
+       ../../../extern/glew/include
        ${FREETYPE_INCLUDE_DIRS}
 )
 
 IF(WITH_INTERNATIONAL)
-       SET(INC ${INC} ${GETTEXT_INC})
+       LIST(APPEND INC ${GETTEXT_INC})
        ADD_DEFINITIONS(-DINTERNATIONAL)
 ENDIF(WITH_INTERNATIONAL)
 
index fbd75a7..0603081 100644 (file)
 FILE(GLOB SRC intern/*.c)
 
 SET(INC 
-       . ../../../intern/guardedalloc ../../../intern/memutil ../editors/include ../blenlib ../makesdna ../modifiers
-       ../render/extern/include ../../../intern/decimation/extern
-       ../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
-       ../../../intern/iksolver/extern ../blenloader ../ikplugin
-       ../nodes ../../../extern/glew/include ../gpu ../makesrna ../../../intern/smoke/extern
-       ../../../intern/bsp/extern ../blenfont
+       .
+       ../avi
+       ../blenlib
+       ../blenloader
+       ../editors/include
+       ../gpu
+       ../ikplugin
+       ../imbuf
+       ../makesdna
+       ../makesrna
+       ../modifiers
+       ../nodes
+       ../render/extern/include
+       ../../../extern/glew/include
        ../../../intern/audaspace/intern
+       ../../../intern/bsp/extern ../blenfont
+       ../../../intern/decimation/extern
+       ../../../intern/elbeem/extern
+       ../../../intern/guardedalloc
+       ../../../intern/iksolver/extern
+       ../../../intern/memutil
+       ../../../intern/opennl/extern
+       ../../../intern/smoke/extern
     ../../../source/blender/windowmanager # XXX - BAD LEVEL CALL WM_api.h
        ${ZLIB_INC}
 )
@@ -42,7 +58,7 @@ SET(INC
 ADD_DEFINITIONS(-DGLEW_STATIC)
 
 IF(WITH_BULLET)
-       SET(INC ${INC} ../../../extern/bullet2/src)
+       LIST(APPEND INC ../../../extern/bullet2/src)
        ADD_DEFINITIONS(-DUSE_BULLET)
 ENDIF(WITH_BULLET)
 
@@ -71,28 +87,30 @@ IF(WITH_IMAGE_HDR)
 ENDIF(WITH_IMAGE_HDR)
 
 IF(WITH_QUICKTIME)
-       SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
+       LIST(APPEND INC ../quicktime)
+       LIST(APPEND INC ${QUICKTIME_INC})
        ADD_DEFINITIONS(-DWITH_QUICKTIME)
 ENDIF(WITH_QUICKTIME)
 
 IF(WITH_FFMPEG)
-       SET(INC ${INC} ${FFMPEG_INC})
+       LIST(APPEND INC ${FFMPEG_INC})
        ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
 IF(WITH_LCMS)
-       SET(INC ${INC} ${LCMS_INCLUDE_DIR})
+       LIST(APPEND INC ${LCMS_INCLUDE_DIR})
        ADD_DEFINITIONS(-DWITH_LCMS)
 ENDIF(WITH_LCMS)
 
 IF(WITH_PYTHON)
-       SET(INC ${INC} ../python ${PYTHON_INC})
+       LIST(APPEND INC ../python)
+       LIST(APPEND INC ${PYTHON_INC})
 ELSE(WITH_PYTHON)
        ADD_DEFINITIONS(-DDISABLE_PYTHON)
 ENDIF(WITH_PYTHON)
 
 IF(WITH_OPENMP)
-               ADD_DEFINITIONS(-DPARALLEL=1)
+       ADD_DEFINITIONS(-DPARALLEL=1)
 ENDIF(WITH_OPENMP)
 
 IF(NOT WITH_FLUID)
@@ -100,18 +118,17 @@ IF(NOT WITH_FLUID)
 ENDIF(NOT WITH_FLUID)
 
 IF(WITH_LZO)
-       SET(INC ${INC} ../../../extern/lzo/minilzo)
+       LIST(APPEND INC ../../../extern/lzo/minilzo)
        ADD_DEFINITIONS(-DWITH_LZO)
 ENDIF(WITH_LZO)
 
 IF(WITH_LZMA)
-       SET(INC ${INC} ../../../extern/lzma)
+       LIST(APPEND INC ../../../extern/lzma)
        ADD_DEFINITIONS(-DWITH_LZMA)
 ENDIF(WITH_LZMA)
 
 IF(WIN32)
-       SET(INC ${INC} ${PTHREADS_INC})
+       LIST(APPEND INC ${PTHREADS_INC})
 ENDIF(WIN32)
 
 BLENDERLIB(bf_blenkernel "${SRC}" "${INC}")
-
index ab1dc3f..998b3c6 100644 (file)
 FILE(GLOB SRC intern/*.c)
 
 SET(INC 
-       . ../makesdna ../blenkernel ../../../intern/guardedalloc ../include
-       ../gpu ../../../intern/ghost
+       .
+       ../makesdna
+       ../blenkernel
+       ../include
+       ../gpu
+       ../../../intern/ghost
+       ../../../intern/guardedalloc
        ${FREETYPE_INCLUDE_DIRS}
-       ${ZLIB_INC}
 )
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
index 3fe85e2..d5e8e37 100644 (file)
 FILE(GLOB SRC intern/*.c intern/CMP_nodes/*.c intern/SHD_nodes/*.c intern/TEX_nodes/*.c)
 
 SET(INC 
-       . ../../../intern/guardedalloc ../editors/include ../blenlib ../makesdna
-       ../render/extern/include ../../../intern/decimation/extern ../makesrna
-       ../imbuf ../avi ../../../intern/elbeem/extern
-       ../../../intern/iksolver/extern ../blenloader
-       ../blenkernel ../../../extern/glew/include ../gpu
-       ${ZLIB_INC}
+       .
+       ../blenkernel
+       ../blenlib
+       ../blenloader
+       ../gpu
+       ../imbuf
+       ../makesdna
+       ../makesrna
+       ../render/extern/include
+       ../../../intern/guardedalloc
+       ../../../extern/glew/include
 )
 
 IF(WIN32)
index bcb038b..9edcc8b 100644 (file)
@@ -62,7 +62,7 @@ CompBuf *dupalloc_compbuf(CompBuf *cbuf)
 {
        CompBuf *dupbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1);
        if(dupbuf) {
-               memcpy(dupbuf->rect, cbuf->rect, cbuf->type*sizeof(float)*cbuf->x*cbuf->y);
+               memmove(dupbuf->rect, cbuf->rect, cbuf->type*sizeof(float)*cbuf->x*cbuf->y);
        
                dupbuf->xof= cbuf->xof;
                dupbuf->yof= cbuf->yof;
index ce7474a..a96cce5 100644 (file)
@@ -31,12 +31,10 @@ SET(INC .
        ../../../intern/guardedalloc ../../../intern/memutil
        ../blenlib ../makesdna ../makesrna ../blenkernel
        ../include ../imbuf ../render/extern/include
-       ../../../intern/bsp/extern
-       ../../../intern/decimation/extern ../blenloader
+       ../blenloader
        ../../kernel/gen_system ../readstreamglue
        ../../../intern/elbeem/extern
        ../../../intern/ghost ../../../intern/opennl/extern ../../../extern/glew/include
-       ../python
        ../nodes
        ../gpu
        ../blenfont
index ea6507b..c4e01ba 100644 (file)
@@ -82,12 +82,6 @@ IF(NOT WITH_SDL)
        ADD_DEFINITIONS(-DDISABLE_SDL)
 ENDIF(NOT WITH_SDL)
 
-IF(UNIX AND NOT APPLE)
-       SET(BLENDERPATH ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION})
-       # blender_path in creator.c
-       ADD_DEFINITIONS(-DBLENDERPATH="${BLENDERPATH}")
-ENDIF(UNIX AND NOT APPLE)
-
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
        ADD_DEFINITIONS(-DWITH_BINRELOC)
        INCLUDE_DIRECTORIES(${BINRELOC_INC})
@@ -97,7 +91,7 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 SET(EXESRC creator.c)
 
 IF(WIN32)
-       SET(EXESRC ${EXESRC} ../icons/winblender.rc)
+       LIST(APPEND EXESRC ../icons/winblender.rc)
 ENDIF(WIN32)
 
 IF(WITH_BUILDINFO)
@@ -107,7 +101,7 @@ IF(WITH_BUILDINFO)
        ADD_DEFINITIONS(-DBUILD_PLATFORM="${CMAKE_SYSTEM_NAME}")
        ADD_DEFINITIONS(-DBUILD_TYPE="${CMAKE_BUILD_TYPE}")
        
-       SET(EXESRC ${EXESRC} buildinfo.c)
+       LIST(APPEND EXESRC buildinfo.c)
 ENDIF(WITH_BUILDINFO)
 
 MESSAGE(STATUS "Configuring blender")
@@ -440,11 +434,11 @@ FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
 SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_render)
 
 IF(WITH_FLUID)
-       SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} bf_intern_elbeem)
+       LIST(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
 ENDIF(WITH_FLUID)
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-       SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
+       LIST(APPEND BLENDER_LINK_LIBS extern_binreloc)
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
 #IF(UNIX)
@@ -562,11 +556,11 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
        )
 
        IF(WITH_CXX_GUARDEDALLOC)
-               SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_intern_guardedalloc_cpp)
+               LIST(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
        ENDIF(WITH_CXX_GUARDEDALLOC)
 
        IF(WITH_QUICKTIME)
-               SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_quicktime)
+               LIST(APPEND BLENDER_SORTED_LIBS bf_quicktime)
        ENDIF(WITH_QUICKTIME)
 
 
index 46c5ea8..66d1401 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC gen_messaging gen_system ../../intern/string ../../intern/moto/include ../../source/blender/blenloader )
+SET(INC
+       gen_messaging
+       gen_system
+       ../../intern/string
+       ../../intern/moto/include
+       ../../source/blender/blenloader
+)
 
 FILE(GLOB SRC   
        gen_messaging/intern/messaging.c