svn merge -r37276:38555 https://svn.blender.org/svnroot/bf-blender/trunk/blender .
[blender-staging.git] / intern / ghost / CMakeLists.txt
index 24553a348aca8e2355b6d832c4cc77e1b99e2f3b..b69dff607e8890eb5222ebd6c6149df0dfa99d05 100644 (file)
@@ -37,17 +37,16 @@ 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_EventPrinter.cpp
        intern/GHOST_ISystem.cpp
        intern/GHOST_ISystemPaths.cpp
        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
@@ -64,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
@@ -75,7 +75,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
@@ -89,13 +88,37 @@ set(SRC
        intern/GHOST_WindowManager.h
 )
 
-if(WITH_HEADLESS)
+if(WITH_GHOST_DEBUG)
        list(APPEND SRC
-               intern/GHOST_DisplayManagerNULL.h
-               intern/GHOST_SystemNULL.h
-               intern/GHOST_WindowNULL.h
+               intern/GHOST_EventPrinter.cpp
+
+               intern/GHOST_EventPrinter.h
        )
-       add_definitions(-DWITH_HEADLESS)
+       add_definitions(-DWITH_GHOST_DEBUG)
+endif()
+
+
+if(WITH_HEADLESS OR WITH_GHOST_SDL)
+       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_GHOST_SDL)
+       endif()
+
 
        # ack, this is still system dependant
        if(APPLE)
@@ -124,6 +147,10 @@ if(WITH_HEADLESS)
                )
        endif()
 
+       list(APPEND INC_SYS
+               ${SDL_INCLUDE_DIR}
+       )
+
 elseif(APPLE)
        if(WITH_COCOA)
                list(APPEND SRC
@@ -163,7 +190,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
@@ -185,7 +214,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)
@@ -193,7 +224,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