CMake option 'WITH_HEADLESS' to build blender in headless mode (no x11/xlib) with...
[blender.git] / intern / ghost / intern / GHOST_ISystem.cpp
index 040164e2c4020817b070184d701fc2747bcf0a0b..7f170d2e8767e1814c1fe254662a1060925c2413 100644 (file)
@@ -41,7 +41,9 @@
 
 #include "GHOST_ISystem.h"
 
-#ifdef WIN32
+#ifdef WITH_HEADLESS
+#      include "GHOST_SystemNULL.h"
+#elif defined(WIN32)
 #      include "GHOST_SystemWin32.h"
 #else
 #      ifdef __APPLE__
@@ -63,7 +65,9 @@ GHOST_TSuccess GHOST_ISystem::createSystem()
 {
        GHOST_TSuccess success;
        if (!m_system) {
-#ifdef WIN32
+#ifdef WITH_HEADLESS
+               m_system = new GHOST_SystemNULL();
+#elif defined(WIN32)
                m_system = new GHOST_SystemWin32 ();
 #else
 #      ifdef __APPLE__