File: FindCUPS.cmake

package info (click to toggle)
print-manager 4%3A16.08.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,144 kB
  • ctags: 1,137
  • sloc: cpp: 9,771; xml: 39; sh: 4; makefile: 1
file content (59 lines) | stat: -rw-r--r-- 2,560 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
#/***************************************************************************
# *   Copyright (C) 2010-2012 by Daniel Nicoletti                           *
# *   dantti12@gmail.com                                                    *
# *                                                                         *
# *   This program is free software; you can redistribute it and/or modify  *
# *   it under the terms of the GNU General Public License as published by  *
# *   the Free Software Foundation; either version 2 of the License, or     *
# *   (at your option) any later version.                                   *
# *                                                                         *
# *   This program is distributed in the hope that it will be useful,       *
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
# *   GNU General Public License for more details.                          *
# *                                                                         *
# *   You should have received a copy of the GNU General Public License     *
# *   along with this program; see the file COPYING. If not, write to       *
# *   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,  *
# *   Boston, MA 02110-1301, USA.                                           *
# ***************************************************************************/
# - Try to find CUPS
# Once done this will define
#
#  CUPS_FOUND - system has CUPS
#  CUPS_INCLUDE_DIR - the CUPS include directory
#  CUPS_LIB - Link these to use CUPS
#  CUPS_DEFINITIONS - Compiler switches required for using CUPS

# Copyright (c) 2010, Daniel Nicolett, <dantti12@gmail.com>
#
# Redistribution and use is allowed according to the terms of the GPLv2+ license.

IF (CUPS_INCLUDE_DIR AND CUPS_LIB)
    SET(CUPS_FIND_QUIETLY TRUE)
ENDIF (CUPS_INCLUDE_DIR AND CUPS_LIB)

FIND_PATH( CUPS_INCLUDE_DIR cups)

FIND_LIBRARY(CUPS_LIB NAMES cups)

IF (CUPS_INCLUDE_DIR AND CUPS_LIB)
   SET(CUPS_FOUND TRUE)
ELSE (CUPS_INCLUDE_DIR AND CUPS_LIB)
   SET(CUPS_FOUND FALSE)
ENDIF (CUPS_INCLUDE_DIR AND CUPS_LIB)

SET(CUPS_INCLUDE_DIR ${CUPS_INCLUDE_DIR})

IF (CUPS_FOUND)
  IF (NOT CUPS_FIND_QUIETLY)
    MESSAGE(STATUS "Found CUPS: ${CUPS_LIB}")
  ENDIF (NOT CUPS_FIND_QUIETLY)
ELSE (CUPS_FOUND)
  IF (CUPS_FIND_REQUIRED)
    MESSAGE(FATAL_ERROR "Could NOT find CUPS libraries")
  ENDIF (CUPS_FIND_REQUIRED)
ENDIF (CUPS_FOUND)

MARK_AS_ADVANCED(CUPS_INCLUDE_DIR CUPS_LIB)