From cd79a979129e011ff41b3736fc5ec53e6bcfd043 Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 16 Aug 2019 21:32:32 +0200 Subject: [PATCH] Add Windows Implementation Libraries as a submodule --- .gitmodules | 4 ++++ Externals/WIL | 1 + Externals/licenses.md | 2 ++ Source/Core/AudioCommon/CMakeLists.txt | 5 +++++ Source/VSProps/Base.props | 2 ++ 5 files changed, 14 insertions(+) create mode 160000 Externals/WIL diff --git a/.gitmodules b/.gitmodules index 7d8b9393f83c..5e4ce141767c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,7 @@ path = Externals/Qt url = https://github.com/dolphin-emu/ext-win-qt.git branch = master +[submodule "Externals/WIL"] + path = Externals/WIL + url = https://github.com/microsoft/wil.git + branch = master diff --git a/Externals/WIL b/Externals/WIL new file mode 160000 index 000000000000..226108fa5093 --- /dev/null +++ b/Externals/WIL @@ -0,0 +1 @@ +Subproject commit 226108fa5093ea47f4c2e962557e2c91d228d69e diff --git a/Externals/licenses.md b/Externals/licenses.md index 094e5e06dd69..3a853739301c 100644 --- a/Externals/licenses.md +++ b/Externals/licenses.md @@ -60,6 +60,8 @@ Dolphin includes or links code of the following third-party software projects: [LGPLv2+](http://www.surina.net/soundtouch/license.html) - [TAP-Windows](https://openvpn.net/): header only +- [Windows Implementation Libraries](https://github.com/microsoft/wil): + [MIT](https://github.com/microsoft/wil/blob/master/LICENSE) - [xxHash](https://github.com/Cyan4973/xxHash): [2-clause BSD](https://github.com/Cyan4973/xxHash/blob/master/LICENSE) - [zlib](http://www.zlib.net/): diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt index cac46b6b3336..29d5f5c033f8 100644 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ b/Source/Core/AudioCommon/CMakeLists.txt @@ -71,6 +71,11 @@ if(WIN32) WASAPIStream.cpp WASAPIStream.h + target_include_directories(audiocommon PRIVATE + ${PROJECT_SOURCE_DIR}/Externals/WIL/include + ) + target_compile_definitions(audiocommon PRIVATE WIL_SUPPRESS_EXCEPTIONS) + ) endif() diff --git a/Source/VSProps/Base.props b/Source/VSProps/Base.props index bd156bafc61f..865a042f7fc7 100644 --- a/Source/VSProps/Base.props +++ b/Source/VSProps/Base.props @@ -53,6 +53,7 @@ $(ExternalsDir)pugixml;%(AdditionalIncludeDirectories) $(ExternalsDir)SFML\include;%(AdditionalIncludeDirectories) $(ExternalsDir)Vulkan\include;%(AdditionalIncludeDirectories) + $(ExternalsDir)WIL\include;%(AdditionalIncludeDirectories) $(ExternalsDir)xxhash;%(AdditionalIncludeDirectories) $(ExternalsDir)zlib;%(AdditionalIncludeDirectories) HAVE_FFMPEG;%(PreprocessorDefinitions) @@ -64,6 +65,7 @@ USE_ANALYTICS=1;%(PreprocessorDefinitions) USE_DISCORD_PRESENCE;%(PreprocessorDefinitions) CURL_STATICLIB;%(PreprocessorDefinitions) + WIL_SUPPRESS_EXCEPTIONS;%(PreprocessorDefinitions) _ARCH_64=1;_M_X86_64=1;%(PreprocessorDefinitions)