File: Findlibaec.cmake

package info (click to toggle)
g2clib 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,524 kB
  • sloc: ansic: 28,287; python: 76; sh: 46; makefile: 26
file content (31 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
#  Find libaec
#
#  LIBAEC_FOUND        - if false, do not try to use libaec
#  LIBAEC_INCLUDE_DIRS - the libaec include directories
#  LIBAEC_LIBRARIES    - the libraries to link against to use libaec
#
#  This file is part of NCEPLIBS-g2c. Distributed under the LGPL v3.0.

find_package(PkgConfig QUIET)
pkg_check_modules(LIBAEC_PKGCONF QUIET libaec aec)
set(LIBAEC_VERSION ${LIBAEC_PKGCONF_VERSION})

find_path(LIBAEC_INCLUDE_DIRS
  NAMES libaec.h
  HINTS ${LIBAEC_PKGCONF_INCLUDEDIR} ${LIBAEC_PKGCONF_INCLUDE_DIRS}
)

find_library(LIBAEC_LIBRARIES
  NAMES libaec aec
  HINTS ${LIBAEC_PKGCONF_LIBDIR} ${LIBAEC_PKGCONF_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libaec
    FOUND_VAR LIBAEC_FOUND
    REQUIRED_VARS LIBAEC_LIBRARIES LIBAEC_INCLUDE_DIRS
    VERSION_VAR LIBAEC_VERSION
)

mark_as_advanced(LIBAEC_INCLUDE_DIRS LIBAEC_LIBRARIES)