diff options
author | Chris Robinson <[email protected]> | 2020-07-09 00:07:33 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-07-09 00:07:33 -0700 |
commit | f409cb4039260031b3d0c7779a0970034334139d (patch) | |
tree | a9e7948f596105751c0f6778520bf2ead987217c | |
parent | c1383e3a48c6b882adb97df2255a0f2938cb2887 (diff) |
Revert "Don't call find_package(WindowsSDK) if the platform ver is already set"
This reverts commit c1383e3a48c6b882adb97df2255a0f2938cb2887.
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rw-r--r-- | cmake/FindDSound.cmake | 12 |
2 files changed, 10 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bdb245b..38bfb6db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -846,13 +846,10 @@ option(ALSOFT_REQUIRE_WASAPI "Require WASAPI backend" OFF) if(WIN32) set(WINSDK_LIB_DIRS ) set(WINSDK_INCLUDE_DIRS ) - - if(NOT CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION) - find_package(WindowsSDK) - if(WINDOWSSDK_FOUND) - get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS) - get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS) - endif() + find_package(WindowsSDK) + if(WINDOWSSDK_FOUND) + get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS) + get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS) endif() # Check MMSystem backend diff --git a/cmake/FindDSound.cmake b/cmake/FindDSound.cmake index 91f5f4e6..ecd36078 100644 --- a/cmake/FindDSound.cmake +++ b/cmake/FindDSound.cmake @@ -8,12 +8,12 @@ # DSOUND_LIBRARY - the dsound library # -if(WIN32 AND NOT CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION) - find_package(WindowsSDK) - if(WINDOWSSDK_FOUND) - get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS) - get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS) - endif() +if (WIN32) + FIND_PACKAGE(WindowsSDK) + if (WINDOWSSDK_FOUND) + get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS) + get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS) + endif() endif() # DSOUND_INCLUDE_DIR |