File: Findhpdf.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 (41 lines) | stat: -rw-r--r-- 1,558 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
41
# Find haru pdf header and library.
#

# This module defines the following uncached variables:
#  hpdf_FOUND, if false, do not try to use haru pdf.
#  hpdf_INCLUDE_DIRS, where to find hpdf.h.
#  hpdf_LIBRARIES, the libraries to link against to use haru pdf
#  hpdf_LIBRARY_DIRS, the directory where libhpdf (either shared or static)
#  is found.

# Give preference to header found in hpdf subdirectory (which is the
# result of a build and install of upstream libharu), then if not
# found look for the case of no such subdirectory (which is how the
# Debian system version of libharu headers is installed).
find_path(hpdf_INCLUDE_DIR hpdf.h PATHS /usr/local/include /usr/include PATH_SUFFIXES hpdf)
find_path(hpdf_INCLUDE_DIR hpdf.h PATHS /usr/local/include /usr/include)

if(hpdf_INCLUDE_DIR)
  find_library(hpdf_LIBRARY
  NAMES hpdf
  PATHS /usr/local/lib /usr/lib
  )
  if(hpdf_LIBRARY)
    set(hpdf_LIBRARY_DIR "")
    get_filename_component(hpdf_LIBRARY_DIRS ${hpdf_LIBRARY} PATH)
    # Set uncached variables as per standard.
    set(hpdf_FOUND ON)
    set(hpdf_INCLUDE_DIRS ${hpdf_INCLUDE_DIR})
    set(hpdf_LIBRARIES ${hpdf_LIBRARY})
  endif(hpdf_LIBRARY)
endif(hpdf_INCLUDE_DIR)
	    
if(hpdf_FOUND)
  if(NOT hpdf_FIND_QUIETLY)
    message(STATUS "Findhpdf: Found haru header directory, ${hpdf_INCLUDE_DIR}, and library, ${hpdf_LIBRARIES}.")
  endif(NOT hpdf_FIND_QUIETLY)
else(hpdf_FOUND)
  if(hpdf_FIND_REQUIRED)
    message(FATAL_ERROR "Findhpdf: Could not find haru (hpdf) header and/or library.")
  endif(hpdf_FIND_REQUIRED)
endif(hpdf_FOUND)