cmake edits to navmesh so includes are not added unless the game engines enabled.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 11 Sep 2011 00:08:07 +0000 (00:08 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 11 Sep 2011 00:08:07 +0000 (00:08 +0000)
source/blender/editors/object/CMakeLists.txt
source/blender/editors/util/CMakeLists.txt
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/intern/MOD_navmesh.cpp

index 58ebb12e3450f88c3011fa44325b12069e4e75d0..b9b8ddc63052fcc5e9fc0ce89098a7473105f131 100644 (file)
@@ -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
        )
index 5e05342f3dc8a263ddc7dd7a7aefe82c976619ea..c64b16c2d0828b1327d44a1ffb543b99c395446f 100644 (file)
@@ -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()
 
index bdbc51605ba9e5b08f5331d38b9c12a88a219866..083ad052a58f8243a5fec92635f579a49ce4fe16 100644 (file)
@@ -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}")
index bc97023a58b8bb69354ae28eafb7053b57c5fc59..d32281c12b6911bfcd62fb68f9de0f40b76c7391 100644 (file)
 *
 */
 #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)
 {