From f7b9418d25a2fdbead0d21a53bf56b0199fb45f9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 Jul 2011 13:17:54 +0000 Subject: build option to use SDL 1.3 for GHOST rather then X11/Win32/Cocoa api's, This opens up the option for blender to be more easily ported to other devices, OS's. TODO - continuous grab. - text glitch with multiple windows (was a bug in X11 too for a while, will check on this) --- intern/ghost/CMakeLists.txt | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'intern/ghost/CMakeLists.txt') diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 922f6918392..30f5b176532 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -89,13 +89,27 @@ set(SRC intern/GHOST_WindowManager.h ) -if(WITH_HEADLESS) - list(APPEND SRC - intern/GHOST_DisplayManagerNULL.h - intern/GHOST_SystemNULL.h - intern/GHOST_WindowNULL.h - ) - add_definitions(-DWITH_HEADLESS) +if(WITH_HEADLESS OR WITH_SDL_GHOST) + if(WITH_HEADLESS) + list(APPEND SRC + intern/GHOST_DisplayManagerNULL.h + intern/GHOST_SystemNULL.h + intern/GHOST_WindowNULL.h + ) + add_definitions(-DWITH_HEADLESS) + else() + list(APPEND SRC + intern/GHOST_DisplayManagerSDL.cpp + intern/GHOST_SystemSDL.cpp + intern/GHOST_WindowSDL.cpp + + intern/GHOST_DisplayManagerSDL.h + intern/GHOST_SystemSDL.h + intern/GHOST_WindowSDL.h + ) + add_definitions(-DWITH_SDL_GHOST) + endif() + # ack, this is still system dependant if(APPLE) @@ -124,6 +138,8 @@ if(WITH_HEADLESS) ) endif() + list(APPEND INC_SYS ${SDL_INCLUDE_DIR}) + elseif(APPLE) if(WITH_COCOA) list(APPEND SRC -- cgit v1.2.3