1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(build): Fixed header file of libfilteraudio not being found

This commit is contained in:
Maxim Biro 2017-09-20 02:28:40 -04:00
parent ed634ae0f4
commit 8108bfdc35
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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()