From 213a9adcffe33c9a15993a31d142d74d2b4cc128 Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 12 Feb 2020 00:07:56 +0100 Subject: CMake: Fix building ARM64 on Windows --- Source/Core/Common/Arm64Emitter.cpp | 4 ++++ Source/Core/Common/CMakeLists.txt | 4 +++- Source/Core/Common/Hash.cpp | 6 +++++- Source/Core/DolphinQt/CMakeLists.txt | 8 ++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) (limited to 'Source') 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 +#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 +#else #include #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) -- cgit v1.2.3