1 # CMake Config file for QGPGME.
2 # Copyright (C) 2016 Intevation GmbH
4 # This file is part of GPGME.
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.
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.
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
21 # based on a generated file from cmake.
22 # Generated by CMake 3.0.2
24 if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
25 message(FATAL_ERROR "CMake >= 2.6.0 required")
28 cmake_policy(VERSION 2.6)
29 #----------------------------------------------------------------
30 # Generated CMake target import file.
31 #----------------------------------------------------------------
33 # Commands may need to know the format version.
34 set(CMAKE_IMPORT_FILE_VERSION 1)
36 # Protect against multiple inclusion, which would fail when already imported targets are added once more.
38 set(_targetsNotDefined)
40 foreach(_expectedTarget QGpgme)
41 list(APPEND _expectedTargets ${_expectedTarget})
42 if(NOT TARGET ${_expectedTarget})
43 list(APPEND _targetsNotDefined ${_expectedTarget})
45 if(TARGET ${_expectedTarget})
46 list(APPEND _targetsDefined ${_expectedTarget})
49 if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
50 set(CMAKE_IMPORT_FILE_VERSION)
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")
57 unset(_targetsDefined)
58 unset(_targetsNotDefined)
59 unset(_expectedTargets)
61 # Create imported target QGpgme
62 add_library(QGpgme SHARED IMPORTED)
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"
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.")
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
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.
89 unset(_IMPORT_CHECK_FILES_FOR_${target})
91 unset(_IMPORT_CHECK_TARGETS)
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.
96 # Commands beyond this point should not need to know the version.
97 set(CMAKE_IMPORT_FILE_VERSION)
100 # Gpgmepp is a requirement for qgpgme
101 find_package(Gpgmepp CONFIG REQUIRED)