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 From 44e45e54c51e2f54c89b173e8844a99ce7f5de75 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Jul 2011 06:04:54 +0000 Subject: - don't build ghost's event printer unless ghost debug is enabled. - use char rather then STR_String for the event printer. - added option to build WITH_GHOST_DEBUG for cmake - renamed WITH_SDL_GHOST --> WITH_GHOST_SDL --- intern/ghost/CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'intern/ghost/CMakeLists.txt') diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 30f5b176532..f887d021220 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -42,7 +42,6 @@ set(SRC intern/GHOST_Path-api.cpp intern/GHOST_DisplayManager.cpp intern/GHOST_EventManager.cpp - intern/GHOST_EventPrinter.cpp intern/GHOST_ISystem.cpp intern/GHOST_ISystemPaths.cpp intern/GHOST_ModifierKeys.cpp @@ -89,7 +88,17 @@ set(SRC intern/GHOST_WindowManager.h ) -if(WITH_HEADLESS OR WITH_SDL_GHOST) +if(WITH_GHOST_DEBUG) + list(APPEND SRC + intern/GHOST_EventPrinter.cpp + + intern/GHOST_EventPrinter.h + ) + add_definitions(-DWITH_GHOST_DEBUG) +endif() + + +if(WITH_HEADLESS OR WITH_GHOST_SDL) if(WITH_HEADLESS) list(APPEND SRC intern/GHOST_DisplayManagerNULL.h @@ -107,7 +116,7 @@ if(WITH_HEADLESS OR WITH_SDL_GHOST) intern/GHOST_SystemSDL.h intern/GHOST_WindowSDL.h ) - add_definitions(-DWITH_SDL_GHOST) + add_definitions(-DWITH_GHOST_SDL) endif() -- cgit v1.2.3 From cf485cd9638825ab911d8eb4cf06f02ae189c864 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Jul 2011 08:15:06 +0000 Subject: Advanced CMake option to build the player without blender: WITH_BLENDER --- intern/ghost/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'intern/ghost/CMakeLists.txt') diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index f887d021220..41c70b7cd16 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -74,7 +74,6 @@ set(SRC intern/GHOST_EventKey.h intern/GHOST_EventManager.h intern/GHOST_EventNDOF.h - intern/GHOST_EventPrinter.h intern/GHOST_EventString.h intern/GHOST_EventTrackpad.h intern/GHOST_EventWheel.h -- cgit v1.2.3 From 410c5e3cd284eba6b17c79042b161eaa9efe6e71 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 16 Jul 2011 23:01:14 +0000 Subject: cmake source definitions: remove missing includes and use more strict formatting. --- intern/ghost/CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'intern/ghost/CMakeLists.txt') diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 41c70b7cd16..f49d075d9f9 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -146,7 +146,9 @@ if(WITH_HEADLESS OR WITH_GHOST_SDL) ) endif() - list(APPEND INC_SYS ${SDL_INCLUDE_DIR}) + list(APPEND INC_SYS + ${SDL_INCLUDE_DIR} + ) elseif(APPLE) if(WITH_COCOA) @@ -185,7 +187,9 @@ elseif(UNIX) add_definitions(-DWITH_X11_XINPUT) endif() - list(APPEND INC_SYS ${X11_X11_INCLUDE_PATH}) + list(APPEND INC_SYS + ${X11_X11_INCLUDE_PATH} + ) list(APPEND SRC intern/GHOST_DisplayManagerX11.cpp @@ -205,7 +209,9 @@ elseif(UNIX) if(X11_XF86keysym_INCLUDE_PATH) add_definitions(-DWITH_XF86KEYSYM) - list(APPEND INC_SYS ${X11_XF86keysym_INCLUDE_PATH}) + list(APPEND INC_SYS + ${X11_XF86keysym_INCLUDE_PATH} + ) endif() elseif(WIN32) @@ -213,7 +219,9 @@ elseif(WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") endif() - list(APPEND INC_SYS ${WINTAB_INC}) + list(APPEND INC_SYS + ${WINTAB_INC} + ) list(APPEND SRC intern/GHOST_DisplayManagerWin32.cpp -- cgit v1.2.3 From 5792bd7cc74581a5ac37325207c1cc6a338be9c7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 17 Jul 2011 09:11:13 +0000 Subject: cmake: cleanup include paths, some duplicates and going up some unneeded dirs. --- intern/ghost/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'intern/ghost/CMakeLists.txt') diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index f49d075d9f9..ccd763ef42c 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -37,9 +37,8 @@ set(INC_SYS set(SRC intern/GHOST_Buttons.cpp - intern/GHOST_CallbackEventConsumer.cpp intern/GHOST_C-api.cpp - intern/GHOST_Path-api.cpp + intern/GHOST_CallbackEventConsumer.cpp intern/GHOST_DisplayManager.cpp intern/GHOST_EventManager.cpp intern/GHOST_ISystem.cpp @@ -47,6 +46,7 @@ set(SRC intern/GHOST_ModifierKeys.cpp intern/GHOST_NDOFManager.cpp intern/GHOST_Path-api.cpp + intern/GHOST_Path-api.cpp intern/GHOST_Rect.cpp intern/GHOST_System.cpp intern/GHOST_TimerManager.cpp @@ -63,6 +63,7 @@ set(SRC GHOST_Path-api.h GHOST_Rect.h GHOST_Types.h + intern/GHOST_Buttons.h intern/GHOST_CallbackEventConsumer.h intern/GHOST_Debug.h -- cgit v1.2.3