File: Findxapian.cmake

package info (click to toggle)
doxygen 1.9.8%2Bds-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,000 kB
  • sloc: cpp: 215,370; lex: 42,621; python: 32,388; ansic: 26,705; xml: 15,390; javascript: 8,352; yacc: 581; f90: 455; php: 441; perl: 378; makefile: 195; sh: 24; objc: 14; cs: 5; java: 1
file content (42 lines) | stat: -rw-r--r-- 1,378 bytes parent folder | download | duplicates (6)
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
# Find xapian search engine library
#
#  XAPIAN_FOUND - system has Xapian
#  XAPIAN_INCLUDE_DIR - the Xapian include directory
#  XAPIAN_LIBRARIES - the libraries needed to use Xapian
#
# Copyright © 2010 Harald Sitter <apachelogger@ubuntu.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)
    # Already in cache, be silent
    set(xapian_FIND_QUIETLY TRUE)
endif(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)

FIND_PATH(XAPIAN_INCLUDE_DIR xapian/version.h)

FIND_LIBRARY(XAPIAN_LIBRARIES NAMES xapian)

IF(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)
   SET(XAPIAN_FOUND TRUE)
ELSE(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)
   SET(XAPIAN_FOUND FALSE)
ENDIF(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)

IF(XAPIAN_FOUND)
   IF(NOT xapian_FIND_QUIETLY)
      MESSAGE(STATUS "Found xapian: ${XAPIAN_LIBRARIES}")
   ENDIF(NOT xapian_FIND_QUIETLY)
ELSE(XAPIAN_FOUND)
   IF(xapian_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find xapian")
   ENDIF(xapian_FIND_REQUIRED)
   IF(NOT xapian_FIND_QUIETLY)
      MESSAGE(STATUS "Could not find xapian")
   ENDIF(NOT xapian_FIND_QUIETLY)
ENDIF(XAPIAN_FOUND)

# show the XAPIAN_INCLUDE_DIR and XAPIAN_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(XAPIAN_INCLUDE_DIR XAPIAN_LIBRARIES)