Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(build): Fixed header file of libfilteraudio not being found
Browse files Browse the repository at this point in the history
  • Loading branch information
nurupo committed Sep 20, 2017
1 parent ed634ae commit 8108bfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand All @@ -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()
Expand Down

0 comments on commit 8108bfd

Please sign in to comment.