|
Revision 5031, 1.6 kB
(checked in by root_42, 16 months ago)
|
|
- Added cmake detection code for gpgme, can also be used in the daemon
- Some german translation stuff
|
| Line | |
|---|
| 1 | # - Try to find gpgme |
|---|
| 2 | # Once done this will define |
|---|
| 3 | # |
|---|
| 4 | # GPGME_FOUND - system has gpgme |
|---|
| 5 | # GPGME_INCLUDE_DIRS - the gpgme include directory |
|---|
| 6 | # GPGME_LIBRARIES - Link these to use gpgme |
|---|
| 7 | # GPGME_DEFINITIONS - Compiler switches required for using gpgme |
|---|
| 8 | # |
|---|
| 9 | # Copyright (c) 2007 Arne Schmitz <arne.schmitz@gmx.net> |
|---|
| 10 | # |
|---|
| 11 | # Redistribution and use is allowed according to the terms of the New |
|---|
| 12 | # BSD license. |
|---|
| 13 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
|---|
| 14 | # |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | if (GPGME_LIBRARIES AND GPGME_INCLUDE_DIRS) |
|---|
| 18 | # in cache already |
|---|
| 19 | set(GPGME_FOUND TRUE) |
|---|
| 20 | else (GPGME_LIBRARIES AND GPGME_INCLUDE_DIRS) |
|---|
| 21 | find_path(GPGME_INCLUDE_DIR |
|---|
| 22 | NAMES |
|---|
| 23 | gpgme.h |
|---|
| 24 | PATHS |
|---|
| 25 | /usr/include |
|---|
| 26 | /usr/local/include |
|---|
| 27 | /opt/local/include |
|---|
| 28 | /sw/include |
|---|
| 29 | ) |
|---|
| 30 | |
|---|
| 31 | find_library(GPGME_LIBRARY |
|---|
| 32 | NAMES |
|---|
| 33 | gpgme |
|---|
| 34 | PATHS |
|---|
| 35 | /usr/lib |
|---|
| 36 | /usr/local/lib |
|---|
| 37 | /opt/local/lib |
|---|
| 38 | /sw/lib |
|---|
| 39 | ) |
|---|
| 40 | |
|---|
| 41 | set(GPGME_INCLUDE_DIRS |
|---|
| 42 | ${GPGME_INCLUDE_DIR} |
|---|
| 43 | ) |
|---|
| 44 | set(GPGME_LIBRARIES |
|---|
| 45 | ${GPGME_LIBRARY} |
|---|
| 46 | ) |
|---|
| 47 | |
|---|
| 48 | if (GPGME_INCLUDE_DIRS AND GPGME_LIBRARIES) |
|---|
| 49 | set(GPGME_FOUND TRUE) |
|---|
| 50 | endif (GPGME_INCLUDE_DIRS AND GPGME_LIBRARIES) |
|---|
| 51 | |
|---|
| 52 | if (GPGME_FOUND) |
|---|
| 53 | if (NOT gpgme_FIND_QUIETLY) |
|---|
| 54 | message(STATUS "Found gpgme: ${GPGME_LIBRARIES}") |
|---|
| 55 | endif (NOT gpgme_FIND_QUIETLY) |
|---|
| 56 | else (GPGME_FOUND) |
|---|
| 57 | if (gpgme_FIND_REQUIRED) |
|---|
| 58 | message(FATAL_ERROR "Could not find gpgme") |
|---|
| 59 | endif (gpgme_FIND_REQUIRED) |
|---|
| 60 | endif (GPGME_FOUND) |
|---|
| 61 | |
|---|
| 62 | # show the GPGME_INCLUDE_DIRS and GPGME_LIBRARIES variables only in the advanced view |
|---|
| 63 | mark_as_advanced(GPGME_INCLUDE_DIRS GPGME_LIBRARIES) |
|---|
| 64 | |
|---|
| 65 | endif (GPGME_LIBRARIES AND GPGME_INCLUDE_DIRS) |
|---|