[Bf-blender-cvs] [7ded7610ce5] master: Cleanup: rename WITH_X11 to WITH_GHOST_X11

Campbell Barton noreply at git.blender.org
Fri May 1 11:15:49 CEST 2020


Commit: 7ded7610ce53c9bc8b571332589105dfb86a89c1
Author: Campbell Barton
Date:   Fri May 1 19:14:50 2020 +1000
Branches: master
https://developer.blender.org/rB7ded7610ce53c9bc8b571332589105dfb86a89c1

Cleanup: rename WITH_X11 to WITH_GHOST_X11

Matches WITH_GHOST_{SDL|WAYLAND}

===================================================================

M	CMakeLists.txt
M	build_files/cmake/platform/platform_unix.cmake
M	extern/CMakeLists.txt
M	intern/ghost/CMakeLists.txt
M	intern/ghost/intern/GHOST_ISystem.cpp
M	intern/ghost/intern/GHOST_IXrGraphicsBinding.h
M	intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
M	intern/ghost/intern/GHOST_Xr_openxr_includes.h
M	intern/ghost/test/CMakeLists.txt
M	source/blender/windowmanager/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1201ddda333..f4ccd8483ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 0bd33b93dcf..3cfe8309bf1 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -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})
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index e79aba0e988..235c2fa931a 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -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()
 
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 3ba6c5d48c7..7620bd43630 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -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!
diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp
index 8041f7758d8..11d1c501d04 100644
--- a/intern/ghost/intern/GHOST_ISystem.cpp
+++ b/intern/ghost/intern/GHOST_ISystem.cpp
@@ -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();
     }
diff --git a/intern/ghost/intern/GHOST_IXrGraphicsBinding.h b/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
index cddb557d163..5794a682023 100644
--- a/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
+++ b/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
@@ -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;
diff --git a/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp b/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
index 60b3b06f6a8..5e30502f7ff 100644
--- a/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
+++ b/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
@@ -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);
 
diff --git a/intern/ghost/intern/GHOST_Xr_openxr_includes.h b/intern/ghost/intern/GHOST_Xr_openxr_includes.h
index 925d6037750..9cac43b1549 100644
--- a/intern/ghost/intern/GHOST_Xr_openxr_includes.h
+++ b/intern/ghost/intern/GHOST_Xr_openxr_includes.h
@@ -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
 
diff --git a/intern/ghost/test/CMakeLists.txt b/intern/ghost/test/CMakeLists.txt
index eda41eb9c1a..b6e3c0ecf5f 100644
--- a/intern/ghost/test/CMakeLists.txt
+++ b/intern/ghost/test/CMakeLists.txt
@@ -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
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index 90ff7bb8f85..22fd55cd49a 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -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)



More information about the Bf-blender-cvs mailing list