Skip to content

Commit

Permalink
Merge pull request #1149 from Sonicadvance1/enable_local_xxhash
Browse files Browse the repository at this point in the history
Use externals xxhash if not found installed
  • Loading branch information
Stefanos Kornilios Mitsis Poiitidis authored Jul 6, 2021
2 parents 1a64c90 + 728e9fc commit 0a8ee43
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}/")
Expand Down
2 changes: 1 addition & 1 deletion External/FEXCore/Source/Interface/Core/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <xxh3.h>
#include <xxhash.h>
#include <fstream>
#include <unistd.h>
#include <filesystem>
Expand Down
1 change: 1 addition & 0 deletions External/xxhash
Submodule xxhash added at 86c1eb

0 comments on commit 0a8ee43

Please sign in to comment.