dont include the preview.blend in headless mode
authorCampbell Barton <ideasman42@gmail.com>
Wed, 13 Jul 2011 19:27:42 +0000 (19:27 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 13 Jul 2011 19:27:42 +0000 (19:27 +0000)
source/blender/editors/datafiles/CMakeLists.txt
source/blender/editors/render/CMakeLists.txt
source/blender/editors/render/render_preview.c

index 080673d6e543295539fc73c3ad365eba5d638b6e..17e3a868a8cc89da62b7e9d5a7a14551ec01b54f 100644 (file)
@@ -37,13 +37,16 @@ if(WITH_BLENDER)
        # blender only
        list(APPEND SRC
                startup.blend.c
-               preview.blend.c
                bmonofont.ttf.c
        )
 
        if(NOT WITH_HEADLESS)
                # blender UI only
                list(APPEND SRC
+                       # blends
+                       preview.blend.c
+
+                       # images
                        splash.png.c
                        blenderbuttons.c
 
index 0d1de00806b11eebd2126ea209edcf0c81825e17..7e497200710cfb61254329f06eaa90dce7c7b1eb 100644 (file)
@@ -60,4 +60,8 @@ if(WITH_OPENMP)
        add_definitions(-DPARALLEL=1)
 endif()
 
+if(WITH_HEADLESS)
+       add_definitions(-DWITH_HEADLESS)
+endif()
+
 blender_add_lib(bf_editor_render "${SRC}" "${INC}" "${INC_SYS}")
index 2404805c17b3905f16fb6107ecb5cdb0a2f76570..007ae96ae59876d9cf600b715066978980f70f71 100644 (file)
@@ -171,6 +171,7 @@ static Main *pr_main= NULL;
 
 void ED_preview_init_dbase(void)
 {
+#ifndef WITH_HEADLESS
        BlendFileData *bfd;
        extern int datatoc_preview_blend_size;
        extern char datatoc_preview_blend[];
@@ -184,6 +185,7 @@ void ED_preview_init_dbase(void)
                MEM_freeN(bfd);
        }
        G.fileflags= fileflags;
+#endif
 }
 
 void ED_preview_free_dbase(void)