From b5160ec6854d6ee42f3040b1ecb4609c493230e8 Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 8 May 2019 21:41:07 +0200 Subject: [PATCH] Common/CMake: Fix Windows build --- Source/Core/AudioCommon/CMakeLists.txt | 10 +--------- Source/Core/Common/CMakeLists.txt | 9 +++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt index 577bdb41fb..8d58daab72 100644 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ b/Source/Core/AudioCommon/CMakeLists.txt @@ -57,16 +57,8 @@ if(WIN32) ) target_link_libraries(audiocommon PRIVATE audiocommon_xaudio27) - set(ENV{OPENALDIR} ${PROJECT_SOURCE_DIR}/Externals/OpenAL) # Dolphin loads openal32.dll at runtime - find_package(OpenAL) - if(OPENAL_FOUND) - message(STATUS "OpenAL found, enabling OpenAL sound backend") - target_sources(audiocommon PRIVATE OpenALStream.cpp) - target_link_libraries(audiocommon PRIVATE OpenAL::OpenAL) - else() - message(STATUS "OpenAL NOT found in Externals") - endif() + target_sources(audiocommon PRIVATE OpenALStream.cpp) endif() target_link_libraries(audiocommon PRIVATE cubeb SoundTouch FreeSurround) diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index 21f25d750e..1f544f4625 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -69,6 +69,14 @@ if (APPLE) ${COREFOUNDATION_LIBRARY} ${IOK_LIBRARY} ) +elseif(WIN32) + target_link_libraries(common + PRIVATE + kernel32.lib + shlwapi.lib + opengl32.lib + winmm.lib + ) endif() if(ANDROID) @@ -78,6 +86,7 @@ if(ANDROID) ) elseif(WIN32) target_sources(common PRIVATE + LdrWatcher.cpp Logging/ConsoleListenerWin.cpp ) else()