88ed2422ddebb0425139779917176ae3f697c118
[platform/upstream/gpgme.git] / lang / qt / src / QGpgmeConfig.cmake.in.in
1 # CMake Config file for QGPGME.
2 # Copyright (C) 2016 Intevation GmbH
3 #
4 # This file is part of GPGME.
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 QGpgme)
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 # Create imported target QGpgme
62 add_library(QGpgme SHARED IMPORTED)
63
64 set_target_properties(QGpgme PROPERTIES
65   INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/qgpgme;@resolved_includedir@"
66   INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt5::Core"
67   IMPORTED_LOCATION "@resolved_libdir@/libqgpgme.so"
68 )
69
70 if(CMAKE_VERSION VERSION_LESS 2.8.12)
71   message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
72 endif()
73
74 # Loop over all imported files and verify that they actually exist
75 foreach(target ${_IMPORT_CHECK_TARGETS} )
76   foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
77     if(NOT EXISTS "${file}" )
78       message(FATAL_ERROR "The imported target \"${target}\" references the file
79    \"${file}\"
80 but this file does not exist.  Possible reasons include:
81 * The file was deleted, renamed, or moved to another location.
82 * An install or uninstall procedure did not complete successfully.
83 * The installation package was faulty and contained
84    \"${CMAKE_CURRENT_LIST_FILE}\"
85 but not all the files it references.
86 ")
87     endif()
88   endforeach()
89   unset(_IMPORT_CHECK_FILES_FOR_${target})
90 endforeach()
91 unset(_IMPORT_CHECK_TARGETS)
92
93 # This file does not depend on other imported targets which have
94 # been exported from the same project but in a separate export set.
95
96 # Commands beyond this point should not need to know the version.
97 set(CMAKE_IMPORT_FILE_VERSION)
98 cmake_policy(POP)
99
100 # Gpgmepp is a requirement for qgpgme
101 find_package(Gpgmepp CONFIG REQUIRED)