Permalink
Browse files

Changed cmake option to exclude X11 rather than Vulkan itself.

  • Loading branch information...
hissingshark committed Jun 19, 2018
1 parent e4fea3b commit d1f116356fcce17c48e5637fe723e5922ed3ecb5
Showing with 10 additions and 10 deletions.
  1. +10 −10 CMakeLists.txt
@@ -80,15 +80,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
endif()
# We only support Vulkan on Unix, Android and Windows.
if(DISABLE_VULKAN)
set(VULKAN OFF)
message("Vulkan disabled")
if(ANDROID OR WIN32 OR (UNIX AND NOT APPLE))
set(VULKAN ON)
else()
if(ANDROID OR WIN32 OR (UNIX AND NOT APPLE))
set(VULKAN ON)
else()
add_definitions(-DNO_VULKAN)
endif()
add_definitions(-DNO_VULKAN)
endif()
if(NOT DEFINED HEADLESS)
@@ -119,6 +114,7 @@ option(USING_EGL "Set to ON if target environment uses EGL" ${USING_EGL})
option(USING_FBDEV "Set to ON if target environment uses fbdev (eg. Pandora)" ${USING_FBDEV})
option(USING_GLES2 "Set to ON if target device uses OpenGL ES 2.0" ${USING_GLES2})
option(RASPBIAN "Set to ON to workaround threading issues when building for ARMV7 on Raspbian" ${RASPBIAN})
option(USING_X11_VULKAN "Set to ON if target environment uses X11 for Vulkan" ${USING_X11_VULKAN})
# :: Frontends
option(USING_QT_UI "Set to ON if you wish to use the Qt frontend wrapper" ${USING_QT_UI})
option(MOBILE_DEVICE "Set to ON when targeting a mobile device" ${MOBILE_DEVICE})
@@ -132,10 +128,14 @@ option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_F
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
option(USE_WAYLAND_WSI "Set to ON to require Wayland support for Vulkan" ${USE_WAYLAND_WSI})
option(USE_ADDRESS_SANITIZER "Use Clang memory sanitizer" ${USE_ADDRESS_SANITIZER})
option(DISABLE_VULKAN "Set to ON to if building for Vulkan is unsupported" ${DISABLE_VULKAN})
if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN)
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
if(USING_X11_VULKAN)
message("Using X11 for Vulkan")
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
else()
message("NOT using X11 for Vulkan")
endif()
# add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
find_package(Wayland)
if (USE_WAYLAND_WSI AND NOT WAYLAND_FOUND)

0 comments on commit d1f1163

Please sign in to comment.