From 0445ec395619324e88f56c0c2e02eb5cc08da4d8 Mon Sep 17 00:00:00 2001 From: Chris Burel Date: Thu, 9 Sep 2021 16:13:23 -0700 Subject: [PATCH] Remove references to unsupported "xlib" windowing system support (#4028) Support for X clients is provided by xcb instead. Signed-off-by: Chris Burel --- .../Linux/AzFramework/Application/Application_Linux.cpp | 3 --- .../Linux/AzFramework/Windowing/NativeWindow_Linux.cpp | 3 --- .../AzFramework/Platform/Linux/platform_linux.cmake | 6 +----- .../Vulkan/3rdParty/Platform/Linux/glad_vulkan_linux.cmake | 4 ---- .../Code/Source/Platform/Linux/RHI/WSISurface_Linux.cpp | 3 --- cmake/Platform/Linux/PAL_linux.cmake | 5 +++-- 6 files changed, 4 insertions(+), 20 deletions(-) diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Application/Application_Linux.cpp b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Application/Application_Linux.cpp index 5cc147b038..59602fe788 100644 --- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Application/Application_Linux.cpp +++ b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Application/Application_Linux.cpp @@ -21,9 +21,6 @@ namespace AzFramework #elif PAL_TRAIT_LINUX_WINDOW_MANAGER_WAYLAND #error "Linux Window Manager Wayland not supported." return nullptr; -#elif PAL_TRAIT_LINUX_WINDOW_MANAGER_XLIB - #error "Linux Window Manager XLIB not supported." - return nullptr; #else #error "Linux Window Manager not recognized." return nullptr; diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Windowing/NativeWindow_Linux.cpp b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Windowing/NativeWindow_Linux.cpp index 436be28ee6..2950f8dcfc 100644 --- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Windowing/NativeWindow_Linux.cpp +++ b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Windowing/NativeWindow_Linux.cpp @@ -17,9 +17,6 @@ namespace AzFramework #elif PAL_TRAIT_LINUX_WINDOW_MANAGER_WAYLAND #error "Linux Window Manager Wayland not supported." return nullptr; -#elif PAL_TRAIT_LINUX_WINDOW_MANAGER_XLIB - #error "Linux Window Manager XLIB not supported." - return nullptr; #else #error "Linux Window Manager not recognized." return nullptr; diff --git a/Code/Framework/AzFramework/Platform/Linux/platform_linux.cmake b/Code/Framework/AzFramework/Platform/Linux/platform_linux.cmake index c79c5f1dff..4480f86c1d 100644 --- a/Code/Framework/AzFramework/Platform/Linux/platform_linux.cmake +++ b/Code/Framework/AzFramework/Platform/Linux/platform_linux.cmake @@ -7,7 +7,7 @@ # # Based on the linux window manager trait, perform the appropriate additional build configurations -# Only 'xcb', 'wayland', and 'xlib' are recognized +# Only 'xcb' and 'wayland' are recognized if (${PAL_TRAIT_LINUX_WINDOW_MANAGER} STREQUAL "xcb") find_library(XCB_LIBRARY xcb) @@ -23,10 +23,6 @@ elseif(PAL_TRAIT_LINUX_WINDOW_MANAGER STREQUAL "wayland") set(LY_COMPILE_DEFINITIONS PUBLIC PAL_TRAIT_LINUX_WINDOW_MANAGER_WAYLAND) -elseif(PAL_TRAIT_LINUX_WINDOW_MANAGER STREQUAL "xlib") - - set(LY_COMPILE_DEFINITIONS PUBLIC PAL_TRAIT_LINUX_WINDOW_MANAGER_XLIB) - else() message(FATAL_ERROR, "Linux Window Manager ${PAL_TRAIT_LINUX_WINDOW_MANAGER} is not recognized") diff --git a/Gems/Atom/RHI/Vulkan/3rdParty/Platform/Linux/glad_vulkan_linux.cmake b/Gems/Atom/RHI/Vulkan/3rdParty/Platform/Linux/glad_vulkan_linux.cmake index 1936c5b911..c89bbcb3f2 100644 --- a/Gems/Atom/RHI/Vulkan/3rdParty/Platform/Linux/glad_vulkan_linux.cmake +++ b/Gems/Atom/RHI/Vulkan/3rdParty/Platform/Linux/glad_vulkan_linux.cmake @@ -14,10 +14,6 @@ elseif(PAL_TRAIT_LINUX_WINDOW_MANAGER STREQUAL "wayland") set(GLAD_VULKAN_COMPILE_DEFINITIONS VK_USE_PLATFORM_WAYLAND_KHR ) -elseif(PAL_TRAIT_LINUX_WINDOW_MANAGER STREQUAL "xlib") - set(GLAD_VULKAN_COMPILE_DEFINITIONS - VK_USE_PLATFORM_XLIB_KHR - ) else() message(FATAL_ERROR, "Linux Window Manager ${PAL_TRAIT_LINUX_WINDOW_MANAGER} is not recognized") endif() diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/Platform/Linux/RHI/WSISurface_Linux.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/Platform/Linux/RHI/WSISurface_Linux.cpp index 98e91519ea..a818599b0d 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/Platform/Linux/RHI/WSISurface_Linux.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/Platform/Linux/RHI/WSISurface_Linux.cpp @@ -41,9 +41,6 @@ namespace AZ #elif PAL_TRAIT_LINUX_WINDOW_MANAGER_WAYLAND #error "Linux Window Manager Wayland not supported." return RHI::ResultCode::Unimplemented; -#elif PAL_TRAIT_LINUX_WINDOW_MANAGER_XLIB - #error "Linux Window Manager XLIB not supported." - return RHI::ResultCode::Unimplemented; #else #error "Linux Window Manager not recognized." return RHI::ResultCode::Unimplemented; diff --git a/cmake/Platform/Linux/PAL_linux.cmake b/cmake/Platform/Linux/PAL_linux.cmake index 528bb5794c..c088163dca 100644 --- a/cmake/Platform/Linux/PAL_linux.cmake +++ b/cmake/Platform/Linux/PAL_linux.cmake @@ -41,5 +41,6 @@ set(LY_ASSET_DEPLOY_ASSET_TYPE "pc" CACHE STRING "Set the asset type for deploym ly_set(LY_PYTHON_CMD ${CMAKE_CURRENT_SOURCE_DIR}/python/python.sh) # Set the default window manager that applications should be using on Linux -# Note: Only ("xcb", "wayland", or "xlib" should be considered) -set(PAL_TRAIT_LINUX_WINDOW_MANAGER "xcb" CACHE STRING "Sets the Window Manager type to use when configuring Linux (xcb, wayland, or xlib)") +# Note: Only ("xcb" or "wayland" should be considered) +set(PAL_TRAIT_LINUX_WINDOW_MANAGER "xcb" CACHE STRING "Sets the Window Manager type to use when configuring Linux") +set_property(CACHE PAL_TRAIT_LINUX_WINDOW_MANAGER PROPERTY STRINGS xcb wayland)