From 2a28c85ff91cae0323050a9d116b834204d12883 Mon Sep 17 00:00:00 2001 From: Nick Majkic <8842171-majkic65@users.noreply.gitlab.com> Date: Mon, 18 Mar 2024 00:47:18 +0000 Subject: [PATCH] Clean up CMAKE files for mac and xcode building --- CMakeLists.txt | 3 ++ src/video_core/CMakeLists.txt | 63 ++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a3f5f97d7..b65adba582 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 3.22) +set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT OFF) +set(CMAKE_XCODE_EMIT_RELATIVE_PATH YES) + project(suyu) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 95e46eebf2..de28bf92ba 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -9,7 +9,7 @@ if(LIBVA_FOUND) list(APPEND FFmpeg_LIBRARIES ${LIBVA_LIBRARIES}) endif() -add_library(video_core STATIC +set(sources buffer_cache/buffer_base.h buffer_cache/buffer_cache_base.h buffer_cache/buffer_cache.cpp @@ -315,6 +315,67 @@ add_library(video_core STATIC vulkan_common/vulkan.h ) +if (APPLE) + list(REMOVE_ITEM sources + renderer_opengl/present/filters.cpp + renderer_opengl/present/filters.h + renderer_opengl/present/fsr.cpp + renderer_opengl/present/fsr.h + renderer_opengl/present/fxaa.cpp + renderer_opengl/present/fxaa.h + renderer_opengl/present/layer.cpp + renderer_opengl/present/layer.h + renderer_opengl/present/present_uniforms.h + renderer_opengl/present/smaa.cpp + renderer_opengl/present/smaa.h + renderer_opengl/present/util.h + renderer_opengl/present/window_adapt_pass.cpp + renderer_opengl/present/window_adapt_pass.h + renderer_opengl/blit_image.cpp + renderer_opengl/blit_image.h + renderer_opengl/gl_blit_screen.cpp + renderer_opengl/gl_blit_screen.h + renderer_opengl/gl_buffer_cache_base.cpp + renderer_opengl/gl_buffer_cache.cpp + renderer_opengl/gl_buffer_cache.h + renderer_opengl/gl_compute_pipeline.cpp + renderer_opengl/gl_compute_pipeline.h + renderer_opengl/gl_device.cpp + renderer_opengl/gl_device.h + renderer_opengl/gl_fence_manager.cpp + renderer_opengl/gl_fence_manager.h + renderer_opengl/gl_graphics_pipeline.cpp + renderer_opengl/gl_graphics_pipeline.h + renderer_opengl/gl_rasterizer.cpp + renderer_opengl/gl_rasterizer.h + renderer_opengl/gl_resource_manager.cpp + renderer_opengl/gl_resource_manager.h + renderer_opengl/gl_shader_cache.cpp + renderer_opengl/gl_shader_cache.h + renderer_opengl/gl_shader_manager.cpp + renderer_opengl/gl_shader_manager.h + renderer_opengl/gl_shader_context.h + renderer_opengl/gl_shader_util.cpp + renderer_opengl/gl_shader_util.h + renderer_opengl/gl_state_tracker.cpp + renderer_opengl/gl_state_tracker.h + renderer_opengl/gl_staging_buffer_pool.cpp + renderer_opengl/gl_staging_buffer_pool.h + renderer_opengl/gl_texture_cache.cpp + renderer_opengl/gl_texture_cache.h + renderer_opengl/gl_texture_cache_base.cpp + renderer_opengl/gl_query_cache.cpp + renderer_opengl/gl_query_cache.h + renderer_opengl/maxwell_to_gl.h + renderer_opengl/renderer_opengl.cpp + renderer_opengl/renderer_opengl.h + renderer_opengl/util_shaders.cpp + renderer_opengl/util_shaders.h + ) +endif() + +add_library(video_core STATIC ${sources}) + target_link_libraries(video_core PUBLIC common core) target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder)