Browse Source

[chore] fix cmake inclusion

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
lizzie/turn-everything-ankerl
lizzie 7 days ago
committed by crueter
parent
commit
a289df1403
  1. 13
      .patch/unordered-dense/0001-fix-macos.patch
  2. 1
      CMakeLists.txt
  3. 6
      externals/CMakeLists.txt
  4. 5
      externals/cpmfile.json
  5. 6
      src/common/CMakeLists.txt
  6. 1
      src/dynarmic/CMakeLists.txt
  7. 18
      src/dynarmic/src/dynarmic/CMakeLists.txt

13
.patch/unordered-dense/0001-fix-macos.patch

@ -0,0 +1,13 @@
diff --git a/include/ankerl/unordered_dense.h b/include/ankerl/unordered_dense.h
index 0835342..5fcc763 100644
--- a/include/ankerl/unordered_dense.h
+++ b/include/ankerl/unordered_dense.h
@@ -334,7 +334,7 @@ struct hash<Enum, typename std::enable_if_t<std::is_enum_v<Enum>>> {
using is_avalanching = void;
auto operator()(Enum e) const noexcept -> std::uint64_t {
using underlying = std::underlying_type_t<Enum>;
- return detail::wyhash::hash(static_cast<underlying>(e));
+ return detail::wyhash::hash(uint64_t(underlying(e)));
}
};

1
CMakeLists.txt

@ -576,6 +576,7 @@ add_subdirectory(externals)
# pass targets from externals
find_package(enet)
find_package(MbedTLS)
find_package(unordered_dense REQUIRED)
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
find_package(xbyak)

6
externals/CMakeLists.txt

@ -66,6 +66,9 @@ if (NOT TARGET LLVM::Demangle)
add_library(LLVM::Demangle ALIAS demangle)
endif()
# unordered_dense
AddJsonPackage(unordered-dense)
if (YUZU_STATIC_ROOM)
return()
endif()
@ -244,9 +247,6 @@ if (ENABLE_WEB_SERVICE OR ENABLE_UPDATE_CHECKER)
AddJsonPackage(cpp-jwt)
endif()
# unordered_dense
AddJsonPackage(unordered-dense)
# FFMpeg
if (YUZU_USE_EXTERNAL_FFMPEG OR YUZU_USE_BUNDLED_FFMPEG)
add_subdirectory(ffmpeg)

5
externals/cpmfile.json

@ -94,7 +94,10 @@
"tag": "v%VERSION%",
"hash": "b98b5d4d96f8e0081b184d6c4c1181fae4e41723b54bed4296717d7f417348b48fad0bbcc664cac142b8c8a47e95aa57c1eb1cf6caa855fd782fad3e3ab99e5e",
"find_args": "CONFIG",
"git_version": "4.8.1"
"git_version": "4.8.1",
"patches": [
"0001-fix-macos.patch"
]
},
"mbedtls": {
"package": "MbedTLS",

6
src/common/CMakeLists.txt

@ -255,11 +255,7 @@ if (lz4_ADDED)
target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib)
endif()
if (TARGET unordered_dense::unordered_dense)
# weird quirk of system installs
target_link_libraries(common PUBLIC unordered_dense::unordered_dense)
endif()
target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads)
target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads unordered_dense::unordered_dense)
target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle zstd::zstd)
if(ANDROID)

1
src/dynarmic/CMakeLists.txt

@ -118,6 +118,7 @@ endif()
find_package(fmt 8 CONFIG)
find_package(mcl 0.1.12 REQUIRED)
find_package(unordered_dense REQUIRED)
if ("arm64" IN_LIST ARCHITECTURE OR DYNARMIC_TESTS)
find_package(oaknut 2.0.1 CONFIG)

18
src/dynarmic/src/dynarmic/CMakeLists.txt

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
include(TargetArchitectureSpecificSources)
@ -356,20 +356,10 @@ set_target_properties(dynarmic PROPERTIES
SOVERSION ${dynarmic_VERSION_MAJOR}.${dynarmic_VERSION_MINOR}
)
if (TARGET unordered_dense::unordered_dense)
# weird quirk of system installs
target_link_libraries(dynarmic
PRIVATE
unordered_dense::unordered_dense
)
endif()
target_compile_options(dynarmic PRIVATE ${DYNARMIC_CXX_FLAGS})
target_link_libraries(dynarmic
PUBLIC
fmt::fmt
merry::mcl
)
target_link_libraries(dynarmic PRIVATE unordered_dense::unordered_dense)
target_link_libraries(dynarmic PUBLIC fmt::fmt merry::mcl)
if (BOOST_NO_HEADERS)
target_link_libraries(dynarmic PRIVATE Boost::variant Boost::icl Boost::pool)

Loading…
Cancel
Save