File: FindLIBLO.cmake

package info (click to toggle)
csound 1%3A6.18.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 63,220 kB
  • sloc: ansic: 192,643; cpp: 14,149; javascript: 9,654; objc: 9,181; python: 3,376; java: 3,337; sh: 1,840; yacc: 1,255; xml: 985; perl: 635; lisp: 411; tcl: 341; lex: 217; makefile: 128
file content (67 lines) | stat: -rw-r--r-- 1,559 bytes parent folder | download | duplicates (4)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# - Try to find liblo
# Once done this will define
#
#  LIBLO_FOUND - system has liblo
#  LIBLO_INCLUDE_DIRS - the liblo include directory
#  LIBLO_LIBRARIES - Link these to use liblo
#  LIBLO_DEFINITIONS - Compiler switches required for using liblo
#
#  Adapted from cmake-modules Google Code project
#
#  Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
#
#  (Changes for liblo) Copyright (c) 2008 Kyle Machulis <kyle@nonpolynomial.com>
#
# Redistribution and use is allowed according to the terms of the New BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if(LIBLO_LIBRARIES AND LIBLO_INCLUDE_DIRS)
  # in cache already
  set(LIBLO_FOUND TRUE)
else()
  find_path(LIBLO_INCLUDE_DIR
    NAMES
      lo/lo.h
    PATHS
      /usr/include
      /usr/local/include
      /opt/local/include
      /sw/include
  )

  find_library(LIBLO_LIBRARY
    NAMES
      lo
      liblo
    PATHS
      /usr/lib
      /usr/local/lib
      /opt/local/lib
      /sw/lib
  )

  set(LIBLO_INCLUDE_DIRS
    ${LIBLO_INCLUDE_DIR}
  )
  
  set(LIBLO_LIBRARIES
    ${LIBLO_LIBRARY}
  )

  if(LIBLO_INCLUDE_DIRS AND LIBLO_LIBRARIES)
     set(LIBLO_FOUND TRUE)
  endif()

  if(LIBLO_FOUND)
    if(NOT liblo_FIND_QUIETLY)
      message(STATUS "Found liblo: ${LIBLO_LIBRARIES}")
    endif()
  else()
    if(liblo_FIND_REQUIRED)
      message(FATAL_ERROR "Could not find liblo")
    endif()
  endif()

  # show the LIBLO_INCLUDE_DIRS and LIBLO_LIBRARIES variables only in the advanced view
  mark_as_advanced(LIBLO_INCLUDE_DIRS LIBLO_LIBRARIES)
endif()