fix cmake defaults/include stuff for Sequoia

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-09-04 23:14:13 -04:00
parent e087c50fb7
commit f3287a9f93
10 changed files with 65 additions and 7 deletions

View file

@ -146,6 +146,11 @@ set(EXT_DEFAULT OFF)
if (MSVC OR ANDROID)
set(EXT_DEFAULT ON)
endif()
# See https://github.com/llvm/llvm-project/issues/123946
# OpenBSD va_list doesn't play nice with precompiled headers
if (PLATFORM_FREEBSD OR PLATFORM_OPENBSD OR APPLE)
set(EXT_DEFAULT OFF)
endif()
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ${EXT_DEFAULT} "ENABLE_SDL2;NOT MSVC" OFF)
@ -448,6 +453,9 @@ if (YUZU_USE_CPM)
if (enet_ADDED)
target_include_directories(enet INTERFACE ${enet_SOURCE_DIR}/include)
if (NOT TARGET enet::enet)
add_library(enet::enet ALIAS enet)
endif()
endif()
if (NOT TARGET enet::enet)
@ -456,7 +464,9 @@ if (YUZU_USE_CPM)
# Opus
AddJsonPackage(opus)
if (NOT TARGET Opus::opus)
add_library(Opus::opus ALIAS opus)
endif()
if (Opus_ADDED)
if (MSVC AND CXX_CLANG)
target_compile_options(opus PRIVATE

View file

@ -1,6 +1,15 @@
# SPDX-FileCopyrightText: Copyright 2025 crueter
# SPDX-License-Identifier: GPL-3.0-or-later
# Created-By: crueter
# Docs will come at a later date, mostly this is to just reduce boilerplate
# and some cmake magic to allow for runtime viewing of dependency versions
# Future crueter: Wow this was a lie and a half, at this point I might as well make my own CPN
# haha just kidding... unless?
cmake_minimum_required(VERSION 3.22)
if (MSVC OR ANDROID)
set(BUNDLED_DEFAULT ON)
else()
@ -13,7 +22,6 @@ option(CPMUTIL_FORCE_BUNDLED
option(CPMUTIL_FORCE_SYSTEM
"Force system packages for all CPM dependencies (NOT RECOMMENDED)" OFF)
cmake_minimum_required(VERSION 3.22)
include(CPM)
# cpmfile parsing

View file

@ -47,6 +47,20 @@ endif()
# Glad
add_subdirectory(glad)
# mbedtls
# TODO(crueter): Findmbedtls that ONLY accepts mbedtls2
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)
endif()
endif()
# libusb
if (ENABLE_LIBUSB)
add_subdirectory(libusb)

View file

@ -6,6 +6,21 @@
"hash": "a46b44e4286d08cffda058e856c47f44c7fed3da55fe9555976eb3907fdcc20ead0b1860b0c38319cda01dbf9b1aa5d4b4038c7f1f8fbd97283d837fa9af9772",
"find_args": "CONFIG"
},
"mbedtls": {
"repo": "Mbed-TLS/mbedtls",
"sha": "8c88150ca1",
"hash": "769ad1e94c570671071e1f2a5c0f1027e0bf6bcdd1a80ea8ac970f2c86bc45ce4e31aa88d6d8110fc1bed1de81c48bc624df1b38a26f8b340a44e109d784a966",
"patches": [
"0001-cmake-version.patch"
],
"bundled": true
},
"spirv-headers": {
"package": "SPIRV-Headers",
"repo": "KhronosGroup/SPIRV-Headers",
"sha": "4e209d3d7e",
"hash": "f48bbe18341ed55ea0fe280dbbbc0a44bf222278de6e716e143ca1e95ca320b06d4d23d6583fbf8d03e1428f3dac8fa00e5b82ddcd6b425e6236d85af09550a4"
},
"sirit": {
"repo": "eden-emulator/sirit",
"sha": "db1f1e8ab5",

View file

@ -276,4 +276,13 @@ if(YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(common PRIVATE precompiled_headers.h)
endif()
# IOPS (needed for power state) requires linking to IOKit
if (APPLE)
find_library(IOKIT_LIBRARY IOKit)
if(NOT IOKIT_LIBRARY)
message(FATAL_ERROR "IOKit not found, did you install XCode tools?")
endif()
target_link_libraries(common PRIVATE ${IOKIT_LIBRARY})
endif()
create_target_directory_groups(common)

View file

@ -2,8 +2,8 @@
// SPDX-FileCopyrightText: Copyright 2023 merryhime <https://mary.rs>
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/bit_cast.h"
#include "core/arm/nce/interpreter_visitor.h"
#include "core/memory.h"
#include "dynarmic/common/context.h"
namespace Core {

View file

@ -9,6 +9,7 @@
#include <atomic>
#include <signal.h>
#include <span>
#include <unistd.h>
#include <span>

View file

@ -4,15 +4,14 @@
#include "common/arm64/native_clock.h"
#include "common/bit_cast.h"
#include "common/literals.h"
#include "core/arm/nce/arm_nce.h"
#include "core/arm/nce/guest_context.h"
#include "core/arm/nce/instructions.h"
#include "core/arm/nce/patcher.h"
#include "core/core.h"
#include "core/core_timing.h"
#include "core/hle/kernel/svc.h"
#include "core/memory.h"
#include "core/hle/kernel/k_thread.h"
#include "core/memory.h"
namespace Core::NCE {

View file

@ -135,6 +135,8 @@ target_include_directories(dynarmic_tests PRIVATE . ../src)
target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})
target_compile_definitions(dynarmic_tests PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
target_compile_options(dynarmic_tests PRIVATE -mavx2)
if (ARCHITECTURE_x86_64)
target_compile_options(dynarmic_tests PRIVATE -mavx2)
endif()
add_test(dynarmic_tests dynarmic_tests --durations yes)

View file

@ -368,7 +368,7 @@ if (APPLE)
if (NOT USE_SYSTEM_MOLTENVK)
set(MOLTENVK_PLATFORM "macOS")
set(MOLTENVK_VERSION "v1.3.0")
set(MOLTENVK_VERSION "v1.4.0")
download_moltenvk_external(${MOLTENVK_PLATFORM} ${MOLTENVK_VERSION})
endif()
find_library(MOLTENVK_LIBRARY MoltenVK REQUIRED)