From 8108bfdc358b5070d1dfbf57a02e25439ce09541 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Wed, 20 Sep 2017 02:28:40 -0400 Subject: [PATCH] fix(build): Fixed header file of libfilteraudio not being found --- CMakeLists.txt | 2 +- cmake/Dependencies.cmake | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 384a17d65..855ab5f14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -538,7 +538,7 @@ if(${ENABLE_GTK_SYSTRAY}) endif() if(${USE_FILTERAUDIO}) - search_dependency(FILTERAUDIO LIBRARY filteraudio OPTIONAL) + search_dependency(FILTERAUDIO LIBRARY filteraudio HEADER filter_audio.h OPTIONAL) if(${FILTERAUDIO_FOUND}) set(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES} src/audio/backend/openal2.cpp diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index a76162ca6..456afbc26 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -35,7 +35,7 @@ include(Qt5CorePatches) function(search_dependency pkg) set(options OPTIONAL) - set(oneValueArgs PACKAGE LIBRARY FRAMEWORK) + set(oneValueArgs PACKAGE LIBRARY FRAMEWORK HEADER) set(multiValueArgs) cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -60,7 +60,8 @@ function(search_dependency pkg) # Last, search for the library itself globally. if(NOT ${pkg}_FOUND AND arg_LIBRARY) find_library(${pkg}_LIBRARIES NAMES ${arg_LIBRARY}) - if(${pkg}_LIBRARIES) + find_path(${pkg}_INCLUDE_DIRS NAMES ${arg_HEADER}) + if(${pkg}_LIBRARIES AND ${pkg}_INCLUDE_DIRS) set(${pkg}_FOUND TRUE) endif() endif()