aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/FindLibO3000.cmake
blob: 154ff9c28545b7ddedff2e0853c84acb62d90fbd (plain)
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
# - Try to find libo3000
# Once done, this will define
#
#  LIB3000_FOUND - system has O-3000 library
#  LIB3000_INCLUDE_DIRS - the O-3000 include directories
#  LIB3000_LIBRARIES - link these to use libo3000

include(LibFindMacros)

# Use pkg-config to get hints about paths
libfind_pkg_check_modules(LIBO3000_PKGCONF libo3000)

# Include dir
find_path(LIBO3000_INCLUDE_DIR
  NAMES o3000/o3000.h o3000/o3000_portable.h o3000/image_header.h
  PATHS ${LIBO3000_PKGCONF_INCLUDE_DIRS}
)

# Finally the library itself
find_library(LIBO3000_LIBRARY
  NAMES o3000
  PATHS ${LIBO3000_PKGCONF_LIBRARY_DIRS}
)

# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
set(LIBO3000_PROCESS_INCLUDES LIBO3000_INCLUDE_DIR)
set(LIBO3000_PROCESS_LIBS LIBO3000_LIBRARY)
libfind_process(LIBO3000)