From e01e6d92937b66e83cb566f99c853d48caff515f Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 5 Jul 2021 17:39:19 -0700 Subject: [PATCH 1/2] Adds xxhash external submodule --- .gitmodules | 3 +++ External/xxhash | 1 + 2 files changed, 4 insertions(+) create mode 160000 External/xxhash diff --git a/.gitmodules b/.gitmodules index a49f799a05..da27bc313e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -39,3 +39,6 @@ [submodule "External/drm-headers"] path = External/drm-headers url = https://github.com/FEX-Emu/drm-headers.git +[submodule "External/xxhash"] + path = External/xxhash + url = https://github.com/FEX-Emu/xxHash.git diff --git a/External/xxhash b/External/xxhash new file mode 160000 index 0000000000..86c1eb957e --- /dev/null +++ b/External/xxhash @@ -0,0 +1 @@ +Subproject commit 86c1eb957e1722ebbc1761a84caeed03ba5082de From 728e9fc1875f628edba6709b2d144f1ac2bad72d Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 5 Jul 2021 17:40:09 -0700 Subject: [PATCH 2/2] Use externals xxhash if not found installed Also in the case that you don't have v0.8.0 minimum installed --- CMakeLists.txt | 8 +++++++- External/FEXCore/Source/Interface/Core/Core.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb5447e7be..df71d8955f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,13 @@ endif() find_package(PkgConfig REQUIRED) find_package(Python 3.0 REQUIRED COMPONENTS Interpreter) -pkg_check_modules(XXHASH libxxhash REQUIRED) +pkg_check_modules(XXHASH libxxhash>=0.8.0 QUIET) + +if (NOT XXHASH_FOUND) + message(STATUS "xxHash not found. Using Externals") + add_subdirectory(External/xxhash/) + include_directories(External/xxhash/) +endif() add_definitions(-Wno-trigraphs) add_definitions(-DGLOBAL_DATA_DIRECTORY="${DATA_DIRECTORY}/") diff --git a/External/FEXCore/Source/Interface/Core/Core.cpp b/External/FEXCore/Source/Interface/Core/Core.cpp index 4e155f2914..699e6c4fab 100644 --- a/External/FEXCore/Source/Interface/Core/Core.cpp +++ b/External/FEXCore/Source/Interface/Core/Core.cpp @@ -33,7 +33,7 @@ desc: Glues Frontend, OpDispatcher and IR Opts & Compilation, LookupCache, Dispa #include "Interface/HLE/Thunks/Thunks.h" #include "FEXCore/Utils/Allocator.h" -#include +#include #include #include #include