CMakeLists.txt
changeset 13089 9692ad570003
parent 13086 144fc4e62b72
child 13102 f54a77124843
     1.1 --- a/CMakeLists.txt	Mon Sep 23 18:30:22 2019 -0400
     1.2 +++ b/CMakeLists.txt	Tue Sep 24 16:36:48 2019 -0400
     1.3 @@ -381,6 +381,7 @@
     1.4  set_option(VIDEO_METAL         "Enable Metal support" ${APPLE})
     1.5  set_option(VIDEO_KMSDRM        "Use KMS DRM video driver" ${UNIX_SYS})
     1.6  dep_option(KMSDRM_SHARED       "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF)
     1.7 +set_option(VIDEO_OFFSCREEN     "Use offscreen video driver" OFF)
     1.8  option_string(BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" "OFF")
     1.9  option_string(FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" "OFF")
    1.10  set_option(HIDAPI              "Use HIDAPI for low level joystick drivers" ${OPT_DEF_HIDAPI})
    1.11 @@ -852,6 +853,13 @@
    1.12      set(HAVE_VIDEO_DUMMY TRUE)
    1.13      set(HAVE_SDL_VIDEO TRUE)
    1.14    endif()
    1.15 +  if(VIDEO_OFFSCREEN)
    1.16 +    set(SDL_VIDEO_DRIVER_OFFSCREEN 1)
    1.17 +    file(GLOB VIDEO_OFFSCREEN_SOURCES ${SDL2_SOURCE_DIR}/src/video/offscreen/*.c)
    1.18 +    set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_OFFSCREEN_SOURCES})
    1.19 +    set(HAVE_VIDEO_OFFSCREEN TRUE)
    1.20 +    set(HAVE_SDL_VIDEO TRUE)
    1.21 +  endif()
    1.22  endif()
    1.23  
    1.24  # Platform-specific options and settings