CMake/Warnings
* WITH_GAMEENGINE and WITH_BULLET were being added to the compiler flags, only define in areas that use them. * removed C++ unix warnings by adding -Wno-invalid-offsetof -Wno-sign-compare. the py api uses invalid offsets for attributes. * removed C unix -Wnested-externs warning, these are everywhere in blender. * removed unused BGE python headers * undefine _XOPEN_SOURCE and _POSIX_C_SOURCE in the BGE, python redefines. * renamed USE_BULLET in collision.c to WITH_BULLET for consistency
This commit is contained in:
@@ -204,6 +204,7 @@ IF(UNIX AND NOT APPLE)
|
||||
|
||||
# Better warnings
|
||||
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wnested-externs -Wdeclaration-after-statement")
|
||||
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
|
||||
|
||||
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
@@ -510,14 +511,8 @@ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Extra compile flags
|
||||
IF(WITH_GAMEENGINE)
|
||||
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DGAMEBLENDER ")
|
||||
ENDIF(WITH_GAMEENGINE)
|
||||
IF(WITH_BULLET)
|
||||
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DWITH_BULLET ")
|
||||
ENDIF(WITH_BULLET)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Libraries
|
||||
@@ -537,3 +532,4 @@ ADD_SUBDIRECTORY(source/creator)
|
||||
IF(WITH_PLAYER)
|
||||
ADD_SUBDIRECTORY(blenderplayer)
|
||||
ENDIF(WITH_PLAYER)
|
||||
|
||||
|
@@ -30,14 +30,18 @@ SET(INC
|
||||
. ../../../intern/guardedalloc ../../../intern/memutil ../editors/include ../blenlib ../makesdna
|
||||
../render/extern/include ../../../intern/decimation/extern
|
||||
../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
|
||||
../../../intern/iksolver/extern ../blenloader ../quicktime
|
||||
../../../extern/bullet2/src
|
||||
../../../intern/iksolver/extern ../blenloader
|
||||
../nodes ../../../extern/glew/include ../gpu ../makesrna ../../../intern/smoke/extern
|
||||
../../../intern/bsp/extern
|
||||
../../../intern/audaspace/intern
|
||||
${ZLIB_INC}
|
||||
)
|
||||
|
||||
IF(WITH_BULLET)
|
||||
SET(INC ${INC} ../../../extern/bullet2/src)
|
||||
ADD_DEFINITIONS(-DWITH_BULLET)
|
||||
ENDIF(WITH_BULLET)
|
||||
|
||||
IF(WITH_OPENEXR)
|
||||
ADD_DEFINITIONS(-DWITH_OPENEXR)
|
||||
ENDIF(WITH_OPENEXR)
|
||||
@@ -51,7 +55,7 @@ IF(WITH_DDS)
|
||||
ENDIF(WITH_DDS)
|
||||
|
||||
IF(WITH_QUICKTIME)
|
||||
SET(INC ${INC} ${QUICKTIME_INC})
|
||||
SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
|
||||
ADD_DEFINITIONS(-DWITH_QUICKTIME)
|
||||
ENDIF(WITH_QUICKTIME)
|
||||
|
||||
|
@@ -591,7 +591,7 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap
|
||||
ClothModifierData *clmd = ( ClothModifierData * ) md1;
|
||||
CollisionModifierData *collmd = ( CollisionModifierData * ) md2;
|
||||
MFace *face1=NULL, *face2 = NULL;
|
||||
#ifdef WITH_BULLET
|
||||
#ifdef USE_BULLET
|
||||
ClothVertex *verts1 = clmd->clothObject->verts;
|
||||
#endif
|
||||
double distance = 0;
|
||||
@@ -669,7 +669,7 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef WITH_BULLET
|
||||
#ifdef USE_BULLET
|
||||
// calc distance + normal
|
||||
distance = plNearestPoints (
|
||||
verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa,collpair->pb,collpair->vector );
|
||||
|
@@ -42,6 +42,10 @@ SET(INC ../windowmanager
|
||||
../blenfont
|
||||
)
|
||||
|
||||
IF(WITH_GAMEENGINE)
|
||||
ADD_DEFINITIONS(-DGAMEBLENDER)
|
||||
ENDIF(WITH_GAMEENGINE)
|
||||
|
||||
IF(WITH_INTERNATIONAL)
|
||||
ADD_DEFINITIONS(-DINTERNATIONAL)
|
||||
ENDIF(WITH_INTERNATIONAL)
|
||||
|
@@ -42,6 +42,10 @@ SET(SRC
|
||||
INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include .)
|
||||
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
|
||||
|
||||
IF(WITH_GAMEENGINE)
|
||||
ADD_DEFINITIONS(-DGAMEBLENDER)
|
||||
ENDIF(WITH_GAMEENGINE)
|
||||
|
||||
IF(WITH_OPENEXR)
|
||||
ADD_DEFINITIONS(-DWITH_OPENEXR)
|
||||
ENDIF(WITH_OPENEXR)
|
||||
|
@@ -30,6 +30,17 @@
|
||||
#define KX_PYTHON_H
|
||||
|
||||
//#define USE_DL_EXPORT
|
||||
|
||||
/* python redefines, quiet the compiler */
|
||||
#ifdef _XOPEN_SOURCE
|
||||
#undef _XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
#undef _POSIX_C_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#define USE_MATHUTILS // Blender 2.5x api will use mathutils, for a while we might want to test without it
|
||||
|
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* $Id$
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
||||
* All rights reserved.
|
||||
*
|
||||
* The Original Code is: all of this file.
|
||||
*
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef KX_PYTHON_H
|
||||
#define KX_PYTHON_H
|
||||
|
||||
//#define USE_DL_EXPORT
|
||||
#include "Python.h"
|
||||
|
||||
#endif // KX_PYTHON_H
|
||||
|
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* $Id$
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
||||
* All rights reserved.
|
||||
*
|
||||
* The Original Code is: all of this file.
|
||||
*
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef KX_PYTHON_H
|
||||
#define KX_PYTHON_H
|
||||
|
||||
#define USE_DL_EXPORT
|
||||
#include "Python.h"
|
||||
|
||||
#endif // KX_PYTHON_H
|
||||
|
Reference in New Issue
Block a user