diff options
author | Chris Robinson <[email protected]> | 2020-07-08 23:32:24 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-07-08 23:32:24 -0700 |
commit | c1383e3a48c6b882adb97df2255a0f2938cb2887 (patch) | |
tree | 54f407382d25638aeeed710bed7ddf02c0fe5e55 /CMakeLists.txt | |
parent | da25557ed65a9964d47b06a2472696106208f553 (diff) |
Don't call find_package(WindowsSDK) if the platform ver is already set
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 38bfb6db..2bdb245b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -846,10 +846,13 @@ option(ALSOFT_REQUIRE_WASAPI "Require WASAPI backend" OFF) if(WIN32) set(WINSDK_LIB_DIRS ) set(WINSDK_INCLUDE_DIRS ) - 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) + + 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() endif() # Check MMSystem backend |