From e1c55d807ba9ef3ab5bdce9859a72436c1d29db7 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Tue, 24 May 2016 17:31:11 -0700 Subject: [PATCH] WASAPI: use `check_include_file` instead of 'find_path` in CMake # Current issue: When attempting to compile under MSVC (#49), CMake can't find the WASAPI headers. I'm running Windows 10, Visual Studio Community 2015, and the latest SDK. # Proposed fix: Use `check_include_file` instead of `find_path`, which seems more semantically correct anyways. --- cmake/FindWASAPI.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/FindWASAPI.cmake b/cmake/FindWASAPI.cmake index 4778646..88bb9a6 100644 --- a/cmake/FindWASAPI.cmake +++ b/cmake/FindWASAPI.cmake @@ -3,13 +3,13 @@ # See http://opensource.org/licenses/MIT # WASAPI_FOUND -# WASAPI_INCLUDE_DIR +# AUDIOCLIENT_H if (WIN32) - find_path(WASAPI_INCLUDE_DIR NAMES audioclient.h) + include(CheckIncludeFile) + check_include_file(audioclient.h AUDIOCLIENT_H) endif() include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(WASAPI DEFAULT_MSG WASAPI_INCLUDE_DIR) - -mark_as_advanced(WASAPI_INCLUDE_DIR) +find_package_handle_standard_args(WASAPI DEFAULT_MSG AUDIOCLIENT_H) +mark_as_advanced(AUDIOCLIENT_H)