Merging r38316 through r38338 from trunk into into soc-2011-tomato
[blender.git] / CMakeLists.txt
index f752677ab641e7fe145708de6b7d3a5bed95c19a..b6adf0bdab932c5bb7be59b5ec7e436acd8ba4ff 100644 (file)
@@ -109,6 +109,9 @@ option(WITH_PLAYER        "Build Player" OFF)
 option(WITH_AUDASPACE    "Build with blenders audio library" ON)
 mark_as_advanced(WITH_AUDASPACE)
 
+option(WITH_SDL_GHOST    "Enable building blender against SDL for windowing rather then the native APIs" OFF)
+mark_as_advanced(WITH_SDL_GHOST)
+
 option(WITH_HEADLESS      "Build without graphical support (renderfarm, server mode only)" OFF)
 mark_as_advanced(WITH_HEADLESS)
 
@@ -212,6 +215,10 @@ if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
        message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG require WITH_AUDASPACE")
 endif()
 
+if(NOT WITH_SDL AND WITH_SDL_GHOST)
+       message(FATAL_ERROR "WITH_SDL_GHOST requires WITH_SDL to be ON")
+endif()
+
 if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
        message(FATAL_ERROR "WITH_IMAGE_REDCODE requires WITH_IMAGE_OPENJPEG")
 endif()
@@ -436,7 +443,7 @@ if(UNIX AND NOT APPLE)
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
        set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
 
-       if(NOT WITH_HEADLESS)
+       if((NOT WITH_HEADLESS) AND (NOT WITH_SDL_GHOST))
                find_package(X11 REQUIRED)
                find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
                mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)