Add qgpgme as qt language binding
[gpgme.git] / lang / cpp / src / GpgmeppConfig.cmake.in.in
1 # CMake Config file for GPGMEPP.
2 # Copyright (C) 2016 Intevation GmbH
3 #
4 # This file is part of GPGMEPP.
5 #
6 # GPGME-CL is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # GPGME-CL is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA
20
21 # based on a generated file from cmake.
22 # Generated by CMake 3.0.2
23
24 if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
25    message(FATAL_ERROR "CMake >= 2.6.0 required")
26 endif()
27 cmake_policy(PUSH)
28 cmake_policy(VERSION 2.6)
29 #----------------------------------------------------------------
30 # Generated CMake target import file.
31 #----------------------------------------------------------------
32
33 # Commands may need to know the format version.
34 set(CMAKE_IMPORT_FILE_VERSION 1)
35
36 # Protect against multiple inclusion, which would fail when already imported targets are added once more.
37 set(_targetsDefined)
38 set(_targetsNotDefined)
39 set(_expectedTargets)
40 foreach(_expectedTarget KF5::Gpgmepp Gpgmepp)
41   list(APPEND _expectedTargets ${_expectedTarget})
42   if(NOT TARGET ${_expectedTarget})
43     list(APPEND _targetsNotDefined ${_expectedTarget})
44   endif()
45   if(TARGET ${_expectedTarget})
46     list(APPEND _targetsDefined ${_expectedTarget})
47   endif()
48 endforeach()
49 if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
50   set(CMAKE_IMPORT_FILE_VERSION)
51   cmake_policy(POP)
52   return()
53 endif()
54 if(NOT "${_targetsDefined}" STREQUAL "")
55   message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
56 endif()
57 unset(_targetsDefined)
58 unset(_targetsNotDefined)
59 unset(_expectedTargets)
60
61 # Compute the installation prefix relative to this file.
62 get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
63 get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
64 get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
65 get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
66
67 # Create imported target Gpgmepp
68 add_library(Gpgmepp SHARED IMPORTED)
69
70 set_target_properties(Gpgmepp PROPERTIES
71   INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/gpgme++"
72   INTERFACE_LINK_LIBRARIES "@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@;@GPG_ERROR_LIBS@"
73   IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp@libsuffix@"
74 )
75
76 if(CMAKE_VERSION VERSION_LESS 2.8.12)
77   message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
78 endif()
79
80 # Cleanup temporary variables.
81 set(_IMPORT_PREFIX)
82
83 # Loop over all imported files and verify that they actually exist
84 foreach(target ${_IMPORT_CHECK_TARGETS} )
85   foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
86     if(NOT EXISTS "${file}" )
87       message(FATAL_ERROR "The imported target \"${target}\" references the file
88    \"${file}\"
89 but this file does not exist.  Possible reasons include:
90 * The file was deleted, renamed, or moved to another location.
91 * An install or uninstall procedure did not complete successfully.
92 * The installation package was faulty and contained
93    \"${CMAKE_CURRENT_LIST_FILE}\"
94 but not all the files it references.
95 ")
96     endif()
97   endforeach()
98   unset(_IMPORT_CHECK_FILES_FOR_${target})
99 endforeach()
100 unset(_IMPORT_CHECK_TARGETS)
101
102 # Commands beyond this point should not need to know the version.
103 set(CMAKE_IMPORT_FILE_VERSION)
104 cmake_policy(POP)
105
106 get_filename_component(QGpgme_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
107 # Pull in QGpgme for compatibility with KF5 variant.
108 find_package(QGpgme CONFIG)