From 0527bc47d0fd1baabe7083214732f89e509fc34c Mon Sep 17 00:00:00 2001 From: philippelatulippe Date: Fri, 22 Apr 2011 20:47:04 -0400 Subject: [PATCH] cmake: detect speex if it is in /usr/include/speex/ --- cmake/FindSpeex.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/FindSpeex.cmake b/cmake/FindSpeex.cmake index 18577d84..5730c0bd 100644 --- a/cmake/FindSpeex.cmake +++ b/cmake/FindSpeex.cmake @@ -3,9 +3,12 @@ if(Speex_INCLUDE_DIR AND Speex_LIBRARY) endif() +#It would be a good idea to eventually use pkgconfig here. find_path(Speex_INCLUDE_DIR speex.h /usr/local/include /usr/include + /usr/local/include/speex + /usr/include/speex ) find_library(Speex_LIBRARY NAMES speex @@ -25,6 +28,11 @@ if (Speex_FOUND) endif() else() if(Speex_FIND_REQUIRED) - message(FATAL_ERROR "Could not find speex") + if(NOT Speex_LIBRARIES) + message(FATAL_ERROR "Could not find speex libraries") + endif() + if(NOT Speex_INCLUDE_DIR) + message(FATAL_ERROR "Could not find speex includes") + endif() endif() endif()