@ -19,11 +19,11 @@ macro (libfind_package PREFIX PKG)
endmacro ( )
endmacro ( )
# A s i m p l e w r a p p e r t o m a k e p k g - c o n f i g s e a r c h e s a b i t e a s i e r .
# A s i m p l e w r a p p e r t o m a k e p k g - c o n f i g s e a r c h e s a b i t e a s i e r .
# W o r k s t h e s a m e a s C M a k e ' s i n t e r n a l p k g _ ch e c k _ m o d u l e s b u t i s a l w a y s q u i e t .
# W o r k s t h e s a m e a s C M a k e ' s i n t e r n a l p k g _ se a r c h _ m o d u l e b u t i s a l w a y s q u i e t .
macro ( libfind_pkg_ check _modules )
macro ( libfind_pkg_ sear ch_module)
find_package ( PkgConfig QUIET )
find_package ( PkgConfig QUIET )
if ( PKG_CONFIG_FOUND )
if ( PKG_CONFIG_FOUND )
pkg_ check _modules ( ${ ARGN } QUIET )
pkg_ sear ch_module( ${ ARGN } QUIET )
endif ( )
endif ( )
endmacro ( )
endmacro ( )
@ -47,7 +47,7 @@ function (libfind_pkg_detect PREFIX)
message ( FATAL_ERROR "libfind_pkg_detect requires at least a pkg_config package name to be passed." )
message ( FATAL_ERROR "libfind_pkg_detect requires at least a pkg_config package name to be passed." )
endif ( )
endif ( )
# F i n d l i b r a r y
# F i n d l i b r a r y
libfind_pkg_ check _modules ( ${ PREFIX } _PKGCONF ${ pkgargs } )
libfind_pkg_ sear ch_module( ${ PREFIX } _PKGCONF ${ pkgargs } )
if ( pathargs )
if ( pathargs )
find_path ( ${ PREFIX } _INCLUDE_DIR NAMES ${ pathargs } HINTS ${ ${PREFIX } _PKGCONF_INCLUDE_DIRS} )
find_path ( ${ PREFIX } _INCLUDE_DIR NAMES ${ pathargs } HINTS ${ ${PREFIX } _PKGCONF_INCLUDE_DIRS} )
endif ( )
endif ( )