File: FindLibgcrypt.cmake

package info (click to toggle)
amarok 3.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 112,168 kB
  • sloc: cpp: 195,056; xml: 4,322; ansic: 2,634; javascript: 673; ruby: 528; python: 507; sh: 252; makefile: 12
file content (30 lines) | stat: -rw-r--r-- 877 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
# - Try to find the GNU Libgcrypt library
# Once done this will define
#
#  LIBGCRYPT_FOUND - system has the Libgcrypt library
#  LIBGCRYPT_LIBS - The libraries needed to use Libgcrypt

# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it>
# Copyright (c) 2008, Modestas Vainius, <modestas@vainius.eu>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

include(CheckIncludeFiles)

check_include_files(gcrypt.h HAVE_GCRYPT_H)

if (HAVE_GCRYPT_H)
   set(LIBGCRYPT_HEADERS_FOUND TRUE)
endif ()

if (LIBGCRYPT_HEADERS_FOUND)
   find_library(LIBGCRYPT_LIBS NAMES gcrypt )
endif ()

if (LIBGCRYPT_LIBS)
   set(LIBGCRYPT_FOUND TRUE)
   message(STATUS "Libgcrypt found: ${LIBGCRYPT_LIBS}")
elseif (Libgcrypt_FIND_REQUIRED)
   message(FATAL_ERROR "Could not find Libgcrypt")
endif ()