summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorspycrab <spycrab@users.noreply.github.com>2020-02-13 20:31:49 +0100
committerGitHub <noreply@github.com>2020-02-13 20:31:49 +0100
commitd2b79df40b1e1c31ef8057a8e6600a6e1eb3f852 (patch)
treebb448fdeac82c97d678f0a4965ad44290e9ceb71 /Source
parenta9dc4ac3f0eb692fb0c18cf3b5bd513c909117db (diff)
parent213a9adcffe33c9a15993a31d142d74d2b4cc128 (diff)
Merge pull request #8627 from spycrab/cmake_vs_arm
CMake: Fix building ARM64 on Windows
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/Arm64Emitter.cpp4
-rw-r--r--Source/Core/Common/CMakeLists.txt4
-rw-r--r--Source/Core/Common/Hash.cpp6
-rw-r--r--Source/Core/DolphinQt/CMakeLists.txt8
4 files changed, 20 insertions, 2 deletions
diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp
index 2790b50a75..caf27c707f 100644
--- a/Source/Core/Common/Arm64Emitter.cpp
+++ b/Source/Core/Common/Arm64Emitter.cpp
@@ -15,6 +15,10 @@
#include "Common/CommonTypes.h"
#include "Common/MathUtil.h"
+#ifdef _WIN32
+#include <Windows.h>
+#endif
+
namespace Arm64Gen
{
namespace
diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt
index 0dd69b6c43..de68a145d7 100644
--- a/Source/Core/Common/CMakeLists.txt
+++ b/Source/Core/Common/CMakeLists.txt
@@ -156,9 +156,11 @@ elseif(WIN32)
PRIVATE
kernel32.lib
shlwapi.lib
- opengl32.lib
winmm.lib
)
+ if (_M_X86_64)
+ target_link_libraries(common PRIVATE opengl32.lib)
+ endif()
endif()
if(ANDROID)
diff --git a/Source/Core/Common/Hash.cpp b/Source/Core/Common/Hash.cpp
index ea2375f3c7..525f0b21e2 100644
--- a/Source/Core/Common/Hash.cpp
+++ b/Source/Core/Common/Hash.cpp
@@ -11,9 +11,13 @@
#include "Common/CommonFuncs.h"
#include "Common/Intrinsics.h"
-#if defined(_M_ARM_64) && !defined(_MSC_VER)
+#ifdef _M_ARM_64
+#ifdef _MSC_VER
+#include <intrin.h>
+#else
#include <arm_acle.h>
#endif
+#endif
namespace Common
{
diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt
index 7812d21a8c..f0951cb3b5 100644
--- a/Source/Core/DolphinQt/CMakeLists.txt
+++ b/Source/Core/DolphinQt/CMakeLists.txt
@@ -296,6 +296,14 @@ PRIVATE
imgui
)
+if (WIN32)
+ target_link_libraries(dolphin-emu
+ PRIVATE
+ gdi32.lib
+ shell32.lib
+ )
+endif()
+
if(WIN32)
target_sources(dolphin-emu PRIVATE DolphinQt.manifest DolphinQt.rc)