Revision: 33862
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33862
Author:   gsrb3d
Date:     2010-12-22 23:15:20 +0100 (Wed, 22 Dec 2010)

Log Message:
-----------
Compact -I paths in makefiles for more readble files/output.
Also some white space cleaning and removal of redundant parameter.

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/build_files/cmake/macros.cmake
    trunk/blender/source/blender/makesdna/intern/CMakeLists.txt
    trunk/blender/source/blender/makesrna/intern/CMakeLists.txt
    trunk/blender/source/blenderplayer/CMakeLists.txt
    trunk/blender/source/creator/CMakeLists.txt
    trunk/blender/source/gameengine/CMakeLists.txt
    trunk/blender/source/gameengine/GamePlayer/xembed/CMakeLists.txt

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt        2010-12-22 21:39:48 UTC (rev 33861)
+++ trunk/blender/CMakeLists.txt        2010-12-22 22:15:20 UTC (rev 33862)
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
@@ -689,7 +690,7 @@
        endif()
 
        # used in many places so include globally, like OpenGL
-       include_directories(${PTHREADS_INC})
+       blender_include_dirs(${PTHREADS_INC})
 
 elseif(APPLE)
 
@@ -944,7 +945,7 @@
 #-----------------------------------------------------------------------------
 # Configure OpenGL.
 find_package(OpenGL)
-include_directories(${OPENGL_INCLUDE_DIR})
+blender_include_dirs(${OPENGL_INCLUDE_DIR})
 # unset(OPENGL_LIBRARIES CACHE) # not compat with older cmake 
 # unset(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake 
 
@@ -989,7 +990,6 @@
 
        ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
        ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_CAST_ALIGN -Wcast-align)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DECLARATION_AFTER_STATEMENT 
-Wdeclaration-after-statement)
        ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS 
C_WARN_ERROR_DECLARATION_AFTER_STATEMENT -Werror=declaration-after-statement)
        ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS 
C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION 
-Werror=implicit-function-declaration)
        ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE 
-Werror=return-type)

Modified: trunk/blender/build_files/cmake/macros.cmake
===================================================================
--- trunk/blender/build_files/cmake/macros.cmake        2010-12-22 21:39:48 UTC 
(rev 33861)
+++ trunk/blender/build_files/cmake/macros.cmake        2010-12-22 22:15:20 UTC 
(rev 33862)
@@ -1,4 +1,18 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
+# $Id$
 
+# Nicer makefiles with -I/1/foo/ instead of -I/1/2/3/../../foo/
+# use it instead of include_directories()
+macro(blender_include_dirs
+       includes)
+
+       foreach(inc ${ARGV})
+               get_filename_component(abs_inc ${inc} ABSOLUTE)
+               list(APPEND all_incs ${abs_inc})
+       endforeach()
+       include_directories(${all_incs})
+endmacro()
+
 # only MSVC uses SOURCE_GROUP
 macro(blenderlib_nolist
        name
@@ -7,14 +21,14 @@
 
        # message(STATUS "Configuring library ${name}")
 
-       include_directories(${includes})
+       blender_include_dirs("${includes}")
        add_library(${name} ${sources})
 
        # Group by location on disk
        source_group("Source Files" FILES CMakeLists.txt)
        foreach(SRC ${sources})
                get_filename_component(SRC_EXT ${SRC} EXT)
-               if(${SRC_EXT} MATCHES ".h" OR ${SRC_EXT} MATCHES ".hpp") 
+               if(${SRC_EXT} MATCHES ".h" OR ${SRC_EXT} MATCHES ".hpp")
                        source_group("Header Files" FILES ${SRC})
                else()
                        source_group("Source Files" FILES ${SRC})
@@ -33,7 +47,6 @@
 #              add_library(${name} ${sources})
 #      endmacro()
 
-
 macro(blenderlib
        name
        sources
@@ -50,7 +63,7 @@
        if(COMMAND cmake_policy)
                cmake_policy(SET CMP0003 NEW)
        endif()
-       
+
        link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} 
${FREETYPE_LIBPATH})
 
        if(WITH_PYTHON)
@@ -136,7 +149,7 @@
        if(WITH_OPENAL)
                target_link_libraries(${target} ${OPENAL_LIBRARY})
        endif()
-       if(WITH_FFTW3)  
+       if(WITH_FFTW3)
                target_link_libraries(${target} ${FFTW3_LIB})
        endif()
        if(WITH_JACK)
@@ -147,7 +160,7 @@
        endif()
        if(WITH_SAMPLERATE)
                target_link_libraries(${target} ${LIBSAMPLERATE_LIB})
-       endif() 
+       endif()
        if(WITH_SDL)
                target_link_libraries(${target} ${SDL_LIBRARY})
        endif()
@@ -248,7 +261,7 @@
 # utility macro
 macro(_remove_strict_flags
        flag)
-       
+
        string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
        string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG 
"${CMAKE_C_FLAGS_DEBUG}")
        string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE 
"${CMAKE_C_FLAGS_RELEASE}")
@@ -342,24 +355,24 @@
                        MATH(EXPR BLENDER_VERSION_MINOR "${ITEM} % 100")
                        set(BLENDER_VERSION 
"${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}")
                endif()
-               
+
                if(LASTITEM MATCHES "BLENDER_SUBVERSION")
                        set(BLENDER_SUBVERSION ${ITEM})
                endif()
-               
+
                if(LASTITEM MATCHES "BLENDER_MINVERSION")
                        MATH(EXPR BLENDER_MINVERSION_MAJOR "${ITEM} / 100")
                        MATH(EXPR BLENDER_MINVERSION_MINOR "${ITEM} % 100")
                        set(BLENDER_MINVERSION 
"${BLENDER_MINVERSION_MAJOR}.${BLENDER_MINVERSION_MINOR}")
                endif()
-               
+
                if(LASTITEM MATCHES "BLENDER_MINSUBVERSION")
                        set(BLENDER_MINSUBVERSION ${ITEM})
                endif()
 
                set(LASTITEM ${ITEM})
        endforeach()
-       
+
        # message(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version 
minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: 
${BLENDER_VERSION}")
        # message(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, 
Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: 
${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}")
 endmacro()

Modified: trunk/blender/source/blender/makesdna/intern/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/makesdna/intern/CMakeLists.txt 2010-12-22 
21:39:48 UTC (rev 33861)
+++ trunk/blender/source/blender/makesdna/intern/CMakeLists.txt 2010-12-22 
22:15:20 UTC (rev 33862)
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
@@ -26,7 +27,7 @@
 
 # message(STATUS "Configuring makesdna")
 
-include_directories(../../../../intern/guardedalloc ..)
+blender_include_dirs(../../../../intern/guardedalloc ../)
 
 # Build makesdna executable
 set(SRC

Modified: trunk/blender/source/blender/makesrna/intern/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/makesrna/intern/CMakeLists.txt 2010-12-22 
21:39:48 UTC (rev 33861)
+++ trunk/blender/source/blender/makesrna/intern/CMakeLists.txt 2010-12-22 
22:15:20 UTC (rev 33862)
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id: CMakeLists.txt 17433 2008-11-12 21:16:53Z blendix $
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
@@ -47,7 +48,7 @@
        ../../../../intern/guardedalloc/intern/mmap_win.c
 )
 
-include_directories(
+blender_include_dirs(
        ../../../../intern/audaspace/intern
        ../../../../intern/guardedalloc
        ../../../../intern/memutil

Modified: trunk/blender/source/blenderplayer/CMakeLists.txt
===================================================================
--- trunk/blender/source/blenderplayer/CMakeLists.txt   2010-12-22 21:39:48 UTC 
(rev 33861)
+++ trunk/blender/source/blenderplayer/CMakeLists.txt   2010-12-22 22:15:20 UTC 
(rev 33862)
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
@@ -34,7 +35,7 @@
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
        add_definitions(-DWITH_BINRELOC)
-       include_directories(${BINRELOC_INC})
+       blender_include_dirs(${BINRELOC_INC})
 endif()
 
 add_custom_command(

Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt 2010-12-22 21:39:48 UTC (rev 
33861)
+++ trunk/blender/source/creator/CMakeLists.txt 2010-12-22 22:15:20 UTC (rev 
33862)
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
@@ -29,7 +30,7 @@
 
 setup_libdirs()
 
-include_directories(
+blender_include_dirs(
        ../../intern/guardedalloc
        ../blender/blenlib
        ../blender/blenkernel
@@ -67,12 +68,12 @@
 endif()
 
 if(WITH_PYTHON)
-       include_directories(../blender/python)
+       blender_include_dirs(../blender/python)
        add_definitions(-DWITH_PYTHON)
 endif()
 
 if(WITH_GAMEENGINE)
-       include_directories(
+       blender_include_dirs(
                ../kernel/gen_messaging
                ../kernel/gen_system
        )
@@ -86,7 +87,7 @@
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
        add_definitions(-DWITH_BINRELOC)
-       include_directories(${BINRELOC_INC})
+       blender_include_dirs(${BINRELOC_INC})
 endif()
 
 # Setup the exe sources and buildinfo

Modified: trunk/blender/source/gameengine/CMakeLists.txt
===================================================================
--- trunk/blender/source/gameengine/CMakeLists.txt      2010-12-22 21:39:48 UTC 
(rev 33861)
+++ trunk/blender/source/gameengine/CMakeLists.txt      2010-12-22 22:15:20 UTC 
(rev 33862)
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
@@ -26,7 +27,7 @@
 
 # there are too many inter-includes so best define here
 if(WITH_PYTHON)
-       include_directories(${PYTHON_INC})
+       blender_include_dirs(${PYTHON_INC})
        add_definitions(-DWITH_PYTHON)
 endif()
 

Modified: trunk/blender/source/gameengine/GamePlayer/xembed/CMakeLists.txt
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/xembed/CMakeLists.txt    
2010-12-22 21:39:48 UTC (rev 33861)
+++ trunk/blender/source/gameengine/GamePlayer/xembed/CMakeLists.txt    
2010-12-22 22:15:20 UTC (rev 33862)
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id$
 # ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
 #
@@ -53,7 +54,7 @@
        UnixShell.c 
 )
 
-include_directories(${INC})
+blender_include_dirs(${INC})
 add_library(blender_plugin SHARED ${SRC} )
 
 


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to