Cleanup: rename WITH_X11 to WITH_GHOST_X11

Matches WITH_GHOST_{SDL|WAYLAND}
This commit is contained in:
Campbell Barton 2020-05-01 19:14:50 +10:00
parent 47fea20dc8
commit 7ded7610ce
10 changed files with 24 additions and 23 deletions

View File

@ -140,7 +140,7 @@ get_blender_version()
# First platform specific non-cached vars
if(UNIX AND NOT (APPLE OR HAIKU))
set(WITH_X11 ON)
set(WITH_GHOST_X11 ON)
endif()
# Blender internal features
@ -211,7 +211,7 @@ if(UNIX AND NOT APPLE)
option(WITH_GHOST_WAYLAND "Enable building Blender against Wayland for windowing" OFF)
endif()
if(WITH_X11)
if(WITH_GHOST_X11)
option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
endif()
@ -236,7 +236,7 @@ if(UNIX AND NOT APPLE)
mark_as_advanced(WITH_OPENMP_STATIC)
endif()
if(WITH_X11)
if(WITH_GHOST_X11)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
@ -693,7 +693,7 @@ if(WITH_INSTALL_PORTABLE)
endif()
if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_X11 OFF)
set(WITH_GHOST_X11 OFF)
set(WITH_X11_XINPUT OFF)
set(WITH_X11_XF86VMODE OFF)
set(WITH_X11_XFIXES OFF)

View File

@ -524,7 +524,7 @@ if(WITH_GHOST_WAYLAND)
endif()
endif()
if(WITH_X11)
if(WITH_GHOST_X11)
find_package(X11 REQUIRED)
find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})

View File

@ -72,7 +72,7 @@ if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
endif()
endif()
if(WITH_X11 AND WITH_GHOST_XDND)
if(WITH_GHOST_X11 AND WITH_GHOST_XDND)
add_subdirectory(xdnd)
endif()

View File

@ -149,7 +149,7 @@ if(WITH_HEADLESS OR WITH_GHOST_SDL)
endif()
endif()
elseif(APPLE AND NOT WITH_X11)
elseif(APPLE AND NOT WITH_GHOST_X11)
list(APPEND SRC
intern/GHOST_DisplayManagerCocoa.mm
intern/GHOST_SystemCocoa.mm
@ -177,8 +177,8 @@ elseif(APPLE AND NOT WITH_X11)
)
endif()
elseif(WITH_X11 OR WITH_GHOST_WAYLAND)
if(WITH_X11)
elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
if(WITH_GHOST_X11)
list(APPEND INC_SYS
${X11_X11_INCLUDE_PATH}
)
@ -254,7 +254,7 @@ elseif(WITH_X11 OR WITH_GHOST_WAYLAND)
)
endif()
add_definitions(-DWITH_X11)
add_definitions(-DWITH_GHOST_X11)
endif()
if(WITH_GHOST_WAYLAND)
@ -335,7 +335,7 @@ elseif(WITH_X11 OR WITH_GHOST_WAYLAND)
)
endif()
add_definitions(-DWITH_X11)
add_definitions(-DWITH_GHOST_X11)
elseif(WIN32)
# # Warnings as errors, this is too strict!

View File

@ -27,8 +27,8 @@
#include "GHOST_ISystem.h"
#if defined(WITH_X11) || defined(WITH_GHOST_WAYLAND)
# ifdef WITH_X11
#if defined(WITH_GHOST_X11) || defined(WITH_GHOST_WAYLAND)
# ifdef WITH_GHOST_X11
# include "GHOST_SystemX11.h"
# endif
# ifdef WITH_GHOST_WAYLAND
@ -54,7 +54,7 @@ GHOST_TSuccess GHOST_ISystem::createSystem()
{
GHOST_TSuccess success;
if (!m_system) {
#if defined(WITH_X11) || defined(WITH_GHOST_WAYLAND)
#if defined(WITH_GHOST_X11) || defined(WITH_GHOST_WAYLAND)
# ifdef WITH_GHOST_WAYLAND
try {
m_system = new GHOST_SystemWayland();
@ -62,7 +62,7 @@ GHOST_TSuccess GHOST_ISystem::createSystem()
catch (const std::exception &) {
}
# endif
# ifdef WITH_X11
# ifdef WITH_GHOST_X11
if (!m_system) {
m_system = new GHOST_SystemX11();
}

View File

@ -33,7 +33,7 @@ class GHOST_IXrGraphicsBinding {
public:
union {
#if defined(WITH_X11)
#if defined(WITH_GHOST_X11)
XrGraphicsBindingOpenGLXlibKHR glx;
#elif defined(WIN32)
XrGraphicsBindingOpenGLWin32KHR wgl;

View File

@ -22,7 +22,7 @@
#include <list>
#include <sstream>
#if defined(WITH_X11)
#if defined(WITH_GHOST_X11)
# include "GHOST_ContextGLX.h"
#elif defined(WIN32)
# include "GHOST_ContextD3D.h"
@ -68,7 +68,7 @@ class GHOST_XrGraphicsBindingOpenGL : public GHOST_IXrGraphicsBinding {
XrSystemId system_id,
std::string *r_requirement_info) const override
{
#if defined(WITH_X11)
#if defined(WITH_GHOST_X11)
GHOST_ContextGLX *ctx_gl = static_cast<GHOST_ContextGLX *>(ghost_ctx);
#else
GHOST_ContextWGL *ctx_gl = static_cast<GHOST_ContextWGL *>(ghost_ctx);
@ -107,7 +107,7 @@ class GHOST_XrGraphicsBindingOpenGL : public GHOST_IXrGraphicsBinding {
void initFromGhostContext(GHOST_Context *ghost_ctx) override
{
#if defined(WITH_X11)
#if defined(WITH_GHOST_X11)
GHOST_ContextGLX *ctx_glx = static_cast<GHOST_ContextGLX *>(ghost_ctx);
XVisualInfo *visual_info = glXGetVisualFromFBConfig(ctx_glx->m_display, ctx_glx->m_fbconfig);

View File

@ -42,7 +42,7 @@
#ifdef XR_USE_GRAPHICS_API_D3D12
# include <d3d12.h>
#endif
#ifdef WITH_X11
#ifdef WITH_GHOST_X11
# include <GL/glxew.h>
#endif

View File

@ -85,8 +85,9 @@ endif()
# Libraries
if(UNIX AND NOT APPLE)
set(WITH_X11 ON)
set(WITH_GHOST_X11 ON)
endif()
# for now... default to this
add_definitions(-DWITH_GL_PROFILE_COMPAT)
# BLF needs this to ignore GPU library

View File

@ -153,8 +153,8 @@ endif()
if(WITH_HEADLESS)
add_definitions(-DWITH_HEADLESS)
elseif(WITH_X11)
add_definitions(-DWITH_X11)
elseif(WITH_GHOST_X11)
add_definitions(-DWITH_GHOST_X11)
endif()
if(WITH_PYTHON)