4b5b905b81712ae529c71edf8b59ea36304f138c
[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 KF5::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 # 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 "@libdir@/libgpgme.dll.a;@LIBASSUAN_LIBS@;@GPG_ERROR_LIBS@"
73 )
74
75 # Create imported target QGpgme
76 #add_library(QGpgme SHARED IMPORTED)
77
78 #set_target_properties(KF5::QGpgme PROPERTIES
79 #   INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/qgpgme"
80    #  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX} TODO"
81 #  INTERFACE_LINK_LIBRARIES "Qt5::Core"
82 #)
83
84 if(CMAKE_VERSION VERSION_LESS 2.8.12)
85   message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
86 endif()
87
88 # Cleanup temporary variables.
89 set(_IMPORT_PREFIX)
90
91 # Loop over all imported files and verify that they actually exist
92 foreach(target ${_IMPORT_CHECK_TARGETS} )
93   foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
94     if(NOT EXISTS "${file}" )
95       message(FATAL_ERROR "The imported target \"${target}\" references the file
96    \"${file}\"
97 but this file does not exist.  Possible reasons include:
98 * The file was deleted, renamed, or moved to another location.
99 * An install or uninstall procedure did not complete successfully.
100 * The installation package was faulty and contained
101    \"${CMAKE_CURRENT_LIST_FILE}\"
102 but not all the files it references.
103 ")
104     endif()
105   endforeach()
106   unset(_IMPORT_CHECK_FILES_FOR_${target})
107 endforeach()
108 unset(_IMPORT_CHECK_TARGETS)
109
110 # This file does not depend on other imported targets which have
111 # been exported from the same project but in a separate export set.
112
113 # Commands beyond this point should not need to know the version.
114 set(CMAKE_IMPORT_FILE_VERSION)
115 cmake_policy(POP)