Update src/video_core/CMakeLists.txt
All checks were successful
eden-license / license-header (pull_request) Successful in 21s
All checks were successful
eden-license / license-header (pull_request) Successful in 21s
This commit is contained in:
parent
2bd6a3b94a
commit
fed33c7a54
1 changed files with 367 additions and 381 deletions
|
@ -1,8 +1,8 @@
|
||||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project SPDX-License-Identifier:
|
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||||
# GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
add_subdirectory(host_shaders)
|
add_subdirectory(host_shaders)
|
||||||
|
|
||||||
|
@ -12,8 +12,7 @@ if(LIBVA_FOUND)
|
||||||
list(APPEND FFmpeg_LIBRARIES ${LIBVA_LIBRARIES})
|
list(APPEND FFmpeg_LIBRARIES ${LIBVA_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(
|
add_library(video_core STATIC
|
||||||
video_core STATIC
|
|
||||||
buffer_cache/buffer_base.h
|
buffer_cache/buffer_base.h
|
||||||
buffer_cache/buffer_cache_base.h
|
buffer_cache/buffer_cache_base.h
|
||||||
buffer_cache/buffer_cache.cpp
|
buffer_cache/buffer_cache.cpp
|
||||||
|
@ -316,7 +315,8 @@ add_library(
|
||||||
vulkan_common/nsight_aftermath_tracker.h
|
vulkan_common/nsight_aftermath_tracker.h
|
||||||
vulkan_common/vma.cpp
|
vulkan_common/vma.cpp
|
||||||
vulkan_common/vma.h
|
vulkan_common/vma.h
|
||||||
vulkan_common/vulkan.h)
|
vulkan_common/vulkan.h
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(video_core PUBLIC common core)
|
target_link_libraries(video_core PUBLIC common core)
|
||||||
target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder)
|
target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder)
|
||||||
|
@ -333,61 +333,45 @@ add_dependencies(video_core host_shaders)
|
||||||
target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
|
target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
|
||||||
|
|
||||||
if (VulkanMemoryAllocator_ADDED)
|
if (VulkanMemoryAllocator_ADDED)
|
||||||
target_include_directories(video_core
|
target_include_directories(video_core PUBLIC ${VulkanMemoryAllocator_SOURCE_DIR}/include)
|
||||||
PUBLIC ${VulkanMemoryAllocator_SOURCE_DIR}/include)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# target_link_libraries(video_core PRIVATE sirit Vulkan::Headers
|
target_link_libraries(video_core PRIVATE sirit Vulkan::Headers VulkanUtilityHeaders)
|
||||||
# VulkanUtilityHeaders)
|
|
||||||
|
|
||||||
if (ENABLE_NSIGHT_AFTERMATH)
|
if (ENABLE_NSIGHT_AFTERMATH)
|
||||||
if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK})
|
if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK})
|
||||||
message(
|
message(FATAL_ERROR "Environment variable NSIGHT_AFTERMATH_SDK has to be provided")
|
||||||
FATAL_ERROR "Environment variable NSIGHT_AFTERMATH_SDK has to be provided"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
message(
|
message(FATAL_ERROR "Nsight Aftermath doesn't support non-Windows platforms")
|
||||||
FATAL_ERROR "Nsight Aftermath doesn't support non-Windows platforms")
|
|
||||||
endif()
|
endif()
|
||||||
target_compile_definitions(video_core PRIVATE HAS_NSIGHT_AFTERMATH)
|
target_compile_definitions(video_core PRIVATE HAS_NSIGHT_AFTERMATH)
|
||||||
target_include_directories(video_core
|
target_include_directories(video_core PRIVATE "$ENV{NSIGHT_AFTERMATH_SDK}/include")
|
||||||
PRIVATE "$ENV{NSIGHT_AFTERMATH_SDK}/include")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_compile_options(
|
target_compile_options(video_core PRIVATE
|
||||||
video_core
|
/we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data
|
||||||
PRIVATE /we4242 # 'identifier': conversion from 'type1' to 'type2', possible
|
/we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data
|
||||||
# loss of data
|
|
||||||
/we4244 # 'conversion': conversion from 'type1' to 'type2', possible
|
|
||||||
# loss of data
|
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# error: declaration shadows a typedef in 'interval_base_set<SubType,
|
# error: declaration shadows a typedef in 'interval_base_set<SubType, DomainT, Compare, Interval, Alloc>'
|
||||||
# DomainT, Compare, Interval, Alloc>' error: implicit conversion loses
|
# error: implicit conversion loses integer precision: 'int' to 'boost::icl::bound_type' (aka 'unsigned char')
|
||||||
# integer precision: 'int' to 'boost::icl::bound_type' (aka 'unsigned char')
|
target_compile_options(video_core PRIVATE -Wno-shadow -Wno-unused-local-typedef)
|
||||||
target_compile_options(video_core PRIVATE -Wno-shadow
|
|
||||||
-Wno-unused-local-typedef)
|
|
||||||
else()
|
else()
|
||||||
target_compile_options(video_core PRIVATE -Werror=conversion)
|
target_compile_options(video_core PRIVATE -Werror=conversion)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_options(video_core PRIVATE -Wno-sign-conversion)
|
target_compile_options(video_core PRIVATE
|
||||||
|
-Wno-sign-conversion
|
||||||
|
)
|
||||||
|
|
||||||
# xbyak
|
# xbyak
|
||||||
set_source_files_properties(
|
set_source_files_properties(macro/macro_jit_x64.cpp PROPERTIES COMPILE_OPTIONS "-Wno-conversion;-Wno-shadow")
|
||||||
macro/macro_jit_x64.cpp PROPERTIES COMPILE_OPTIONS
|
|
||||||
"-Wno-conversion;-Wno-shadow")
|
|
||||||
|
|
||||||
# VMA
|
# VMA
|
||||||
set_source_files_properties(
|
set_source_files_properties(vulkan_common/vma.cpp PROPERTIES COMPILE_OPTIONS "-Wno-conversion;-Wno-unused-variable;-Wno-unused-parameter;-Wno-missing-field-initializers")
|
||||||
vulkan_common/vma.cpp
|
|
||||||
PROPERTIES
|
|
||||||
COMPILE_OPTIONS
|
|
||||||
"-Wno-conversion;-Wno-unused-variable;-Wno-unused-parameter;-Wno-missing-field-initializers"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Get around GCC failing with intrinsics in Debug
|
# Get around GCC failing with intrinsics in Debug
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
|
@ -396,8 +380,10 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARCHITECTURE_x86_64)
|
if (ARCHITECTURE_x86_64)
|
||||||
target_sources(video_core PRIVATE macro/macro_jit_x64.cpp
|
target_sources(video_core PRIVATE
|
||||||
macro/macro_jit_x64.h)
|
macro/macro_jit_x64.cpp
|
||||||
|
macro/macro_jit_x64.h
|
||||||
|
)
|
||||||
target_link_libraries(video_core PUBLIC xbyak::xbyak)
|
target_link_libraries(video_core PUBLIC xbyak::xbyak)
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue