diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-11 04:08:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-11 04:08:07 +0400 |
commit | 3a5f2272adc4ec821db16de95781b9ce653dda73 (patch) | |
tree | 380df231d6a2d88cdaf5e3cda9a758fb6b06a8f1 /source | |
parent | 1e6dbb1a4d320fb34a8f0c85329484153062f8a5 (diff) |
cmake edits to navmesh so includes are not added unless the game engines enabled.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/blender/editors/util/CMakeLists.txt | 8 | ||||
-rw-r--r-- | source/blender/modifiers/CMakeLists.txt | 9 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_navmesh.cpp | 18 |
4 files changed, 28 insertions, 12 deletions
diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt index 58ebb12e345..b9b8ddc6305 100644 --- a/source/blender/editors/object/CMakeLists.txt +++ b/source/blender/editors/object/CMakeLists.txt @@ -33,7 +33,6 @@ set(INC ../../render/extern/include ../../windowmanager ../../../../intern/guardedalloc - ../../../../extern/recastnavigation/Recast/Include ) set(INC_SYS @@ -60,6 +59,10 @@ set(SRC ) if(WITH_GAMEENGINE) + list(APPEND INC + ../../../../extern/recastnavigation/Recast/Include + ) + list(APPEND SRC object_navmesh.cpp ) diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index 5e05342f3dc..c64b16c2d08 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -24,7 +24,6 @@ set(INC ../../blenkernel ../../blenlib ../../blenloader - ../../../../extern/recastnavigation/Recast/Include ../../makesdna ../../makesrna ../../windowmanager @@ -63,7 +62,6 @@ set(SRC ../include/ED_markers.h ../include/ED_mball.h ../include/ED_mesh.h - ../include/ED_navmesh_conversion.h ../include/ED_node.h ../include/ED_numinput.h ../include/ED_object.h @@ -90,8 +88,14 @@ set(SRC ) if(WITH_GAMEENGINE) + list(APPEND INC + ../../../../extern/recastnavigation/Recast/Include + ) + list(APPEND SRC navmesh_conversion.cpp + + ../include/ED_navmesh_conversion.h ) endif() diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index bdbc51605ba..083ad052a58 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -34,11 +34,8 @@ set(INC ../makesdna ../makesrna ../render/extern/include - ../editors/include - ../gpu ../../../intern/elbeem/extern ../../../intern/guardedalloc - ../../../extern/recastnavigation/Recast/Include ) set(INC_SYS @@ -120,7 +117,13 @@ if(NOT WITH_MOD_FLUID) endif() if(WITH_GAMEENGINE) + # for MOD_navmesh.cpp add_definitions(-DWITH_GAMEENGINE) + list(APPEND INC + ../gpu + ../../../extern/recastnavigation/Recast/Include + ../editors/include # XXX - BAD LEVEL CALL, REMOVE BEFORE RELEASE + ) endif() blender_add_lib(bf_modifiers "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/modifiers/intern/MOD_navmesh.cpp b/source/blender/modifiers/intern/MOD_navmesh.cpp index bc97023a58b..d32281c12b6 100644 --- a/source/blender/modifiers/intern/MOD_navmesh.cpp +++ b/source/blender/modifiers/intern/MOD_navmesh.cpp @@ -26,10 +26,20 @@ * */ #include <math.h> -#include "Recast.h" + +#ifdef WITH_GAMEENGINE +# include "Recast.h" +#endif extern "C"{ -#include "ED_navmesh_conversion.h" + +#ifdef WITH_GAMEENGINE +# include "ED_navmesh_conversion.h" +# include "BIF_gl.h" +# include "GPU_buffers.h" +# include "GPU_draw.h" +# include "UI_resources.h" +#endif #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -43,10 +53,6 @@ extern "C"{ #include "BKE_particle.h" #include "BKE_customdata.h" #include "MEM_guardedalloc.h" -#include "BIF_gl.h" -#include "GPU_buffers.h" -#include "GPU_draw.h" -#include "UI_resources.h" static void initData(ModifierData *md) { |