File: FindQHULL.cmake

package info (click to toggle)
plplot 5.10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,280 kB
  • ctags: 13,512
  • sloc: ansic: 83,001; xml: 27,081; ada: 18,878; cpp: 15,966; tcl: 11,651; python: 7,075; f90: 7,058; ml: 6,974; java: 6,665; perl: 5,029; sh: 2,210; makefile: 199; lisp: 75; sed: 25; fortran: 7
file content (40 lines) | stat: -rw-r--r-- 1,171 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
32
33
34
35
36
37
38
39
40
# Find qhull header and library.
#

# This module defines the following uncached variables:
#  QHULL_FOUND, if false, do not try to use qhull.
#  QHULL_INCLUDE_DIRS, where to find qhull/qhull_a.h.
#  QHULL_LIBRARIES, the libraries to link against to use the qhull library
#  QHULL_LIBRARY_DIRS, the directory where the qhull library is found.

find_path(
  QHULL_INCLUDE_DIR
    qhull/qhull_a.h
  /usr/local/include
  /usr/include
)

if( QHULL_INCLUDE_DIR )
  find_library(
    QHULL_LIBRARY
    NAMES qhull
    PATHS /usr/local/lib /usr/lib
  )
  if( QHULL_LIBRARY )
    get_filename_component(QHULL_LIBRARY_DIRS ${QHULL_LIBRARY} PATH)
    # Set uncached variables as per standard.
    set(QHULL_FOUND ON)
    set(QHULL_INCLUDE_DIRS ${QHULL_INCLUDE_DIR})
    set(QHULL_LIBRARIES ${QHULL_LIBRARY})
  endif(QHULL_LIBRARY)
endif(QHULL_INCLUDE_DIR)
	    
if(QHULL_FOUND)
  if(NOT QHULL_FIND_QUIETLY)
    message(STATUS "FindQHull: Found both qhull_a.h and libqhull.a")
  endif(NOT QHULL_FIND_QUIETLY)
else(QHULL_FOUND)
  if(QHULL_FIND_REQUIRED)
    message(FATAL_ERROR "FindQHull: Could not find qhull_a.h and/or libqhull.a")
  endif(QHULL_FIND_REQUIRED)
endif(QHULL_FOUND)