diff --git a/flow/gsl/CMakeLists.txt b/flow/gsl/CMakeLists.txt index 7c65553..2a95979 100644 --- a/flow/gsl/CMakeLists.txt +++ b/flow/gsl/CMakeLists.txt @@ -63,7 +63,11 @@ if( WITH_MAD ) if( MAD_FOUND ) set( GSL_HAVE_LIBMAD 1 ) else( MAD_FOUND ) - message(FATAL_ERROR "\nMAD support are requested, but `libmad` not found" ) + find_library( MAD_LIBRARIES NAMES mad ) + find_path( MAD_INCLUDE_DIRS mad.h ) + if( NOT MAD_LIBRARIES ) + message(FATAL_ERROR "\nMAD support is requested, but `libmad` not found" ) + endif( NOT MAD_LIBRARIES ) endif( MAD_FOUND ) endif( WITH_MAD )