[cmake, core] refactor: update mbedtls and make YUZU_USE_CPM better (#485)
update mbedtls functors to support mbedtls3 signatures moved some vulkan stuff from externals to root, yuzu_use_cpm manages them now needs testing: - all key/derivation related things - nca verification - game loading/updates/stuff Reviewed-on: #485 Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
28d26b0d76
commit
d207df959a
16 changed files with 114 additions and 139 deletions
76
externals/CMakeLists.txt
vendored
76
externals/CMakeLists.txt
vendored
|
@ -54,36 +54,27 @@ endif()
|
|||
# Glad
|
||||
add_subdirectory(glad)
|
||||
|
||||
# mbedtls
|
||||
AddJsonPackage(mbedtls)
|
||||
|
||||
if (mbedtls_ADDED)
|
||||
target_include_directories(mbedtls PUBLIC ${mbedtls_SOURCE_DIR}/include)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(mbedcrypto PRIVATE
|
||||
-Wno-unused-but-set-variable
|
||||
-Wno-string-concatenation
|
||||
)
|
||||
elseif(CXX_CLANG)
|
||||
foreach(TARGET mbedtls mbedcrypto mbedx509)
|
||||
target_compile_options(${TARGET} PRIVATE
|
||||
-w
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# libusb
|
||||
if (ENABLE_LIBUSB)
|
||||
add_subdirectory(libusb)
|
||||
endif()
|
||||
|
||||
# Sirit
|
||||
# TODO(crueter): spirv-tools doesn't work w/ system
|
||||
set(SPIRV_WERROR OFF)
|
||||
AddJsonPackage(spirv-headers)
|
||||
# VMA
|
||||
AddJsonPackage(vulkan-memory-allocator)
|
||||
|
||||
if (VulkanMemoryAllocator_ADDED)
|
||||
if (CXX_CLANG)
|
||||
target_compile_options(VulkanMemoryAllocator INTERFACE
|
||||
-Wno-unused-variable
|
||||
)
|
||||
elseif(MSVC)
|
||||
target_compile_options(VulkanMemoryAllocator INTERFACE
|
||||
/wd4189
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Sirit
|
||||
AddJsonPackage(sirit)
|
||||
|
||||
if(MSVC AND USE_CCACHE AND sirit_ADDED)
|
||||
|
@ -117,46 +108,9 @@ if (YUZU_USE_BUNDLED_FFMPEG)
|
|||
set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
# VulkanUtilityHeaders - pulls in headers and utility libs
|
||||
AddJsonPackage(
|
||||
NAME vulkan-utility-headers
|
||||
BUNDLED_PACKAGE ${YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES}
|
||||
)
|
||||
|
||||
# small hack
|
||||
if (NOT VulkanUtilityLibraries_ADDED)
|
||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||
endif()
|
||||
|
||||
# SPIRV Tools
|
||||
AddJsonPackage(
|
||||
NAME spirv-tools
|
||||
BUNDLED_PACKAGE ${YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS}
|
||||
)
|
||||
|
||||
if (SPIRV-Tools_ADDED)
|
||||
add_library(SPIRV-Tools::SPIRV-Tools ALIAS SPIRV-Tools-static)
|
||||
target_link_libraries(SPIRV-Tools-static PRIVATE SPIRV-Tools-opt SPIRV-Tools-link)
|
||||
endif()
|
||||
|
||||
# TZDB (Time Zone Database)
|
||||
add_subdirectory(nx_tzdb)
|
||||
|
||||
# VMA
|
||||
AddJsonPackage(vulkan-memory-allocator)
|
||||
|
||||
if (VulkanMemoryAllocator_ADDED)
|
||||
if (CXX_CLANG)
|
||||
target_compile_options(VulkanMemoryAllocator INTERFACE
|
||||
-Wno-unused-variable
|
||||
)
|
||||
elseif(MSVC)
|
||||
target_compile_options(VulkanMemoryAllocator INTERFACE
|
||||
/wd4189
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT TARGET LLVM::Demangle)
|
||||
add_library(demangle demangle/ItaniumDemangle.cpp)
|
||||
target_include_directories(demangle PUBLIC ./demangle)
|
||||
|
|
42
externals/cpmfile.json
vendored
42
externals/cpmfile.json
vendored
|
@ -1,15 +1,10 @@
|
|||
{
|
||||
"mbedtls": {
|
||||
"repo": "eden-emulator/mbedtls",
|
||||
"sha": "ce4f81f4a9",
|
||||
"hash": "f2e7f887651b28745e508149214d409fd7cfdb92cb94b4146b47ff1e0fc09e47143f203ac18e34c2c1814b5bd031d04c74828676c0d4342920a2ddb7fd35e9a5",
|
||||
"find_args": "MODULE"
|
||||
},
|
||||
"spirv-headers": {
|
||||
"package": "SPIRV-Headers",
|
||||
"repo": "KhronosGroup/SPIRV-Headers",
|
||||
"sha": "4e209d3d7e",
|
||||
"hash": "f48bbe18341ed55ea0fe280dbbbc0a44bf222278de6e716e143ca1e95ca320b06d4d23d6583fbf8d03e1428f3dac8fa00e5b82ddcd6b425e6236d85af09550a4"
|
||||
"vulkan-memory-allocator": {
|
||||
"package": "VulkanMemoryAllocator",
|
||||
"repo": "GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator",
|
||||
"sha": "1076b348ab",
|
||||
"hash": "a46b44e4286d08cffda058e856c47f44c7fed3da55fe9555976eb3907fdcc20ead0b1860b0c38319cda01dbf9b1aa5d4b4038c7f1f8fbd97283d837fa9af9772",
|
||||
"find_args": "CONFIG"
|
||||
},
|
||||
"sirit": {
|
||||
"repo": "eden-emulator/sirit",
|
||||
|
@ -35,31 +30,6 @@
|
|||
"CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF"
|
||||
]
|
||||
},
|
||||
"vulkan-utility-headers": {
|
||||
"package": "VulkanUtilityLibraries",
|
||||
"repo": "scripts/VulkanUtilityHeaders",
|
||||
"tag": "1.4.326",
|
||||
"artifact": "VulkanUtilityHeaders.tar.zst",
|
||||
"git_host": "git.crueter.xyz",
|
||||
"hash": "5924629755cb1605c4aa4eee20ef7957a9dd8d61e4df548be656d98054f2730c4109693c1bd35811f401f4705d2ccff9fc849be32b0d8480bc3f73541a5e0964"
|
||||
},
|
||||
"vulkan-memory-allocator": {
|
||||
"package": "VulkanMemoryAllocator",
|
||||
"repo": "GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator",
|
||||
"sha": "1076b348ab",
|
||||
"hash": "a46b44e4286d08cffda058e856c47f44c7fed3da55fe9555976eb3907fdcc20ead0b1860b0c38319cda01dbf9b1aa5d4b4038c7f1f8fbd97283d837fa9af9772",
|
||||
"find_args": "CONFIG"
|
||||
},
|
||||
"spirv-tools": {
|
||||
"package": "SPIRV-Tools",
|
||||
"repo": "KhronosGroup/SPIRV-Tools",
|
||||
"sha": "40eb301f32",
|
||||
"hash": "58d0fb1047d69373cf24c73e6f78c73a72a6cca3b4df1d9f083b9dcc0962745ef154abf3dbe9b3623b835be20c6ec769431cf11733349f45e7568b3525f707aa",
|
||||
"find_args": "MODULE",
|
||||
"options": [
|
||||
"SPIRV_SKIP_EXECUTABLES ON"
|
||||
]
|
||||
},
|
||||
"xbyak_sun": {
|
||||
"package": "xbyak",
|
||||
"repo": "herumi/xbyak",
|
||||
|
|
12
externals/libusb/CMakeLists.txt
vendored
12
externals/libusb/CMakeLists.txt
vendored
|
@ -3,7 +3,17 @@
|
|||
|
||||
include(CPMUtil)
|
||||
|
||||
AddJsonPackage(libusb)
|
||||
if (PLATFORM_SUN OR PLATFORM_OPENBSD OR PLATFORM_FREEBSD)
|
||||
set(libusb_bundled ON)
|
||||
else()
|
||||
set(libusb_bundled OFF)
|
||||
endif()
|
||||
|
||||
# TODO(crueter): Fix on *BSD/Solaris
|
||||
AddJsonPackage(
|
||||
NAME libusb
|
||||
BUNDLED_PACKAGE ${libusb_bundled}
|
||||
)
|
||||
|
||||
if (NOT libusb_ADDED)
|
||||
return()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue