2016-05-19 23:28:12 +02:00
|
|
|
#
|
|
|
|
# This script defines the following variables:
|
|
|
|
# - MAD_LIBRARY: The mad library
|
|
|
|
# - MAD_FOUND: true if all the required modules are found
|
2016-06-22 12:29:39 +02:00
|
|
|
# - MAD_INCLUDE_DIR: the path where MAD headers are located
|
2016-05-19 23:28:12 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
set(FIND_MAD_PATHS
|
|
|
|
${MAD_ROOT}
|
|
|
|
$ENV{MAD_ROOT}
|
|
|
|
~/Library/Frameworks
|
|
|
|
/Library/Frameworks
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
/sw
|
|
|
|
/opt/local
|
|
|
|
/opt/csw
|
|
|
|
/opt)
|
|
|
|
|
|
|
|
find_path(MAD_INCLUDE_DIR mad.h
|
|
|
|
PATH_SUFFIXES include
|
|
|
|
PATHS ${FIND_MAD_PATHS})
|
|
|
|
|
|
|
|
find_library(MAD_LIBRARY
|
|
|
|
NAMES mad
|
|
|
|
PATH_SUFFIXES lib64 lib
|
|
|
|
PATHS ${FIND_MAD_PATHS})
|
|
|
|
|
|
|
|
if (MAD_INCLUDE_DIR AND MAD_LIBRARY)
|
|
|
|
set (MAD_FOUND TRUE)
|
|
|
|
endif ()
|
|
|
|
|
2016-12-28 04:12:33 +01:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
|
|
|
|
find_package_handle_standard_args(MAD
|
|
|
|
REQUIRED_VARS MAD_LIBRARY MAD_INCLUDE_DIR)
|
|
|
|
|