diff --git a/CMakeLists.txt b/CMakeLists.txt
index 528b1cbb17..75656a7a38 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -516,6 +516,13 @@ include_directories(Source/Core)
add_subdirectory(Externals/Bochs_disasm)
include_directories(Externals/Bochs_disasm)
+if(NOT XXHASH_FOUND)
+ message("Using static xxhash from Externals")
+ add_subdirectory(Externals/xxhash)
+ include_directories(Externals/xxhash)
+endif()
+LIST(APPEND LIBS xxhash)
+
# If zlib has already been found on a previous run of cmake don't check again
# as the check seems to take a long time.
if(NOT ZLIB_FOUND)
diff --git a/Externals/xxhash/CMakeLists.txt b/Externals/xxhash/CMakeLists.txt
new file mode 100644
index 0000000000..475d2ca43a
--- /dev/null
+++ b/Externals/xxhash/CMakeLists.txt
@@ -0,0 +1,7 @@
+project(xxhash C)
+
+set(SRCS
+ xxhash.c
+)
+
+add_library(xxhash STATIC ${SRCS})
diff --git a/Externals/xxhash/xxhash.vcxproj b/Externals/xxhash/xxhash.vcxproj
new file mode 100644
index 0000000000..55574759a8
--- /dev/null
+++ b/Externals/xxhash/xxhash.vcxproj
@@ -0,0 +1,61 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {677EA016-1182-440C-9345-DC88D1E98C0C}
+
+
+
+ StaticLibrary
+ v120
+ Unicode
+
+
+ true
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Core/VideoCommon/VideoCommon.vcxproj b/Source/Core/VideoCommon/VideoCommon.vcxproj
index f76c59e8ba..649cd5095e 100644
--- a/Source/Core/VideoCommon/VideoCommon.vcxproj
+++ b/Source/Core/VideoCommon/VideoCommon.vcxproj
@@ -147,6 +147,9 @@
{b441cc62-877e-4b3f-93e0-0de80544f705}
+
+ {677EA016-1182-440C-9345-DC88D1E98C0C}
+
{ff213b23-2c26-4214-9f88-85271e557e87}
diff --git a/Source/VSProps/Base.props b/Source/VSProps/Base.props
index 4a361b0cb7..3e447b5420 100644
--- a/Source/VSProps/Base.props
+++ b/Source/VSProps/Base.props
@@ -46,6 +46,7 @@
$(ExternalsDir)SOIL;%(AdditionalIncludeDirectories)
$(ExternalsDir)wxWidgets3;%(AdditionalIncludeDirectories)
$(ExternalsDir)wxWidgets3\Include;%(AdditionalIncludeDirectories)
+ $(ExternalsDir)xxhash;%(AdditionalIncludeDirectories)
$(ExternalsDir)zlib;%(AdditionalIncludeDirectories)
_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
USE_UPNP;%(PreprocessorDefinitions)
diff --git a/Source/VSProps/QtCompile.props b/Source/VSProps/QtCompile.props
index 8727c7d60c..9a21863036 100644
--- a/Source/VSProps/QtCompile.props
+++ b/Source/VSProps/QtCompile.props
@@ -89,7 +89,7 @@
in order to prevent the trailing slash from escaping the doublequote after value replacement.
-->
"-I$(QtIncludeDir)QtWidgets" "-I$(QtIncludeDir)QtGui" "-I$(QtIncludeDir)QtCore" "-I$(QtIncludeDir) " "-I$(QtToolOutDir) " -I.
- "-I$(ExternalsDir)zlib" "-I$(ExternalsDir)SOIL" "-I$(ExternalsDir)SFML\include" "-I$(ExternalsDir)portaudio\include" "-I$(ExternalsDir)polarssl\include" "-I$(ExternalsDir)miniupnpc\src" "-I$(ExternalsDir)LZO" "-I$(ExternalsDir)libusbx\libusb" "-I$(ExternalsDir)libpng" "-I$(ExternalsDir)GL" "-I$(ExternalsDir)Bochs_disasm" "-I$(ExternalsDir) " "-I$(CoreDir) " $(MocIncludes)
+ "-I$(ExternalsDir)xxhash" "-I$(ExternalsDir)zlib" "-I$(ExternalsDir)SOIL" "-I$(ExternalsDir)SFML\include" "-I$(ExternalsDir)portaudio\include" "-I$(ExternalsDir)polarssl\include" "-I$(ExternalsDir)miniupnpc\src" "-I$(ExternalsDir)LZO" "-I$(ExternalsDir)libusbx\libusb" "-I$(ExternalsDir)libpng" "-I$(ExternalsDir)GL" "-I$(ExternalsDir)Bochs_disasm" "-I$(ExternalsDir) " "-I$(CoreDir) " $(MocIncludes)
-
\ No newline at end of file
+
diff --git a/Source/VSProps/WXWOverrides.props b/Source/VSProps/WXWOverrides.props
index 213827577f..7b7c253709 100644
--- a/Source/VSProps/WXWOverrides.props
+++ b/Source/VSProps/WXWOverrides.props
@@ -10,11 +10,11 @@
Async
4267;%(DisableSpecificWarnings)
__WXMSW__;WXBUILDING;%(PreprocessorDefinitions)
- ..\..\;..\..\include;..\..\..\zlib;..\..\..\libpng
+ ..\..\;..\..\include;..\..\..\xxhash;..\..\..\zlib;..\..\..\libpng
"/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\" %(AdditionalOptions)
-
\ No newline at end of file
+
diff --git a/Source/dolphin-emu.sln b/Source/dolphin-emu.sln
index 7361f45c3c..c4fb3b6511 100644
--- a/Source/dolphin-emu.sln
+++ b/Source/dolphin-emu.sln
@@ -37,6 +37,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\Externals\libpng\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SOIL", "..\Externals\SOIL\SOIL.vcxproj", "{B441CC62-877E-4B3F-93E0-0DE80544F705}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xxhash", "..\Externals\xxhash\xxhash.vcxproj", "{677EA016-1182-440C-9345-DC88D1E98C0C}"
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\Externals\zlib\zlib.vcxproj", "{FF213B23-2C26-4214-9F88-85271E557E87}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTouch", "..\Externals\soundtouch\SoundTouch.vcxproj", "{EC082900-B4D8-42E9-9663-77F02F6936AE}"
@@ -133,6 +135,10 @@ Global
{B441CC62-877E-4B3F-93E0-0DE80544F705}.Debug|x64.Build.0 = Debug|x64
{B441CC62-877E-4B3F-93E0-0DE80544F705}.Release|x64.ActiveCfg = Release|x64
{B441CC62-877E-4B3F-93E0-0DE80544F705}.Release|x64.Build.0 = Release|x64
+ {677EA016-1182-440C-9345-DC88D1E98C0C}.Debug|x64.ActiveCfg = Debug|x64
+ {677EA016-1182-440C-9345-DC88D1E98C0C}.Debug|x64.Build.0 = Debug|x64
+ {677EA016-1182-440C-9345-DC88D1E98C0C}.Release|x64.ActiveCfg = Release|x64
+ {677EA016-1182-440C-9345-DC88D1E98C0C}.Release|x64.Build.0 = Release|x64
{FF213B23-2C26-4214-9F88-85271E557E87}.Debug|x64.ActiveCfg = Debug|x64
{FF213B23-2C26-4214-9F88-85271E557E87}.Debug|x64.Build.0 = Debug|x64
{FF213B23-2C26-4214-9F88-85271E557E87}.Release|x64.ActiveCfg = Release|x64
@@ -206,6 +212,7 @@ Global
{31643FDB-1BB8-4965-9DE7-000FC88D35AE} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{4C9F135B-A85E-430C-BAD4-4C67EF5FC12C} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{B441CC62-877E-4B3F-93E0-0DE80544F705} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
+ {677EA016-1182-440C-9345-DC88D1E98C0C} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{FF213B23-2C26-4214-9F88-85271E557E87} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{EC082900-B4D8-42E9-9663-77F02F6936AE} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}