From 38708c35bbd1ae1ab826fea657c20d08686478b6 Mon Sep 17 00:00:00 2001 From: lizzie Date: Sat, 13 Jun 2026 02:21:18 -0400 Subject: [PATCH] ok x11 fine --- aarch64-linux-gnu.cmake | 16 ++++++++++++++++ externals/CMakeLists.txt | 8 -------- src/video_core/CMakeLists.txt | 23 +++++++++++++---------- 3 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 aarch64-linux-gnu.cmake diff --git a/aarch64-linux-gnu.cmake b/aarch64-linux-gnu.cmake new file mode 100644 index 0000000000..a39cdcf38d --- /dev/null +++ b/aarch64-linux-gnu.cmake @@ -0,0 +1,16 @@ +# CMake Toolchain file for crosscompiling on ARM. Target operating system name. +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR aarch64) + +# Name of C compiler. +set(CMAKE_C_COMPILER "/usr/bin/aarch64-linux-gnu-gcc") +set(CMAKE_CXX_COMPILER "/usr/bin/aarch64-linux-gnu-g++") + +# Where to look for the target environment. (More paths can be added here) +set(CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu) +set(CMAKE_SYSROOT /usr/aarch64-linux-gnu) + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index b93eda161d..d4ac807322 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -412,11 +412,3 @@ if (APPLE) set(MOLTENVK_LIBRARY "${moltenvk_SOURCE_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib" CACHE STRING "" FORCE) endif() endif() - -# must match src/video_core/vulkan_common/vulkan.h logic -# No we can't "bundle" this... never... NEVER -if (WIN32 OR APPLE OR ANDROID OR PLATFORM_HAIKU OR PLATFORM_PS4) - # ... -else() - find_package(X11 REQUIRED) -endif() diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index ea4395ca7d..9fe5de6981 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -324,6 +324,19 @@ if (ENABLE_OPENGL) ) endif() +# Since this is also used by header-only whom is public: +# a) you must also make it public +# b) should precede the headers themselves +# c) since targets also export targets publicly, this should precede them as well +# must match src/video_core/vulkan_common/vulkan.h logic +if (WIN32 OR APPLE OR ANDROID OR PLATFORM_HAIKU OR PLATFORM_PS4) + # ... +else() + find_package(X11 REQUIRED) + target_include_directories(video_core PUBLIC ${X11_INCLUDE_DIR}) + target_link_libraries(video_core PUBLIC ${X11_LIBRARIES}) +endif() + target_link_libraries(video_core PUBLIC common core) target_link_libraries(video_core PUBLIC shader_recompiler stb bc_decoder gpu_logging) if (ENABLE_OPENGL) @@ -344,16 +357,6 @@ target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE}) target_link_libraries(video_core PRIVATE sirit::sirit) -# Since this is also used by header-only whom is public: -# a) you must also make it public -# b) should precede the headers themselves -# must match src/video_core/vulkan_common/vulkan.h logic -if (WIN32 OR APPLE OR ANDROID OR PLATFORM_HAIKU OR PLATFORM_PS4) - # ... -else() - target_link_libraries(video_core PUBLIC X11) -endif() - # Header-only stuff needed by all dependent targets target_link_libraries(video_core PUBLIC Vulkan::Headers Vulkan::UtilityHeaders GPUOpen::VulkanMemoryAllocator)