Qt/Cpp: Add version headers
[gpgme.git] / lang / cpp / src / Makefile.am
1 # Makefile.am 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 EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in \
22              gpgmepp_version.h.in
23
24 lib_LTLIBRARIES = libgpgmepp.la
25
26 main_sources = \
27     exception.cpp context.cpp key.cpp trustitem.cpp data.cpp callbacks.cpp \
28     eventloopinteractor.cpp editinteractor.cpp assuanresult.cpp \
29     keylistresult.cpp keygenerationresult.cpp importresult.cpp \
30     decryptionresult.cpp verificationresult.cpp \
31     signingresult.cpp encryptionresult.cpp \
32     engineinfo.cpp gpgsetexpirytimeeditinteractor.cpp \
33     gpgsetownertrusteditinteractor.cpp gpgsignkeyeditinteractor.cpp \
34     gpgadduserideditinteractor.cpp defaultassuantransaction.cpp \
35     scdgetinfoassuantransaction.cpp gpgagentgetinfoassuantransaction.cpp \
36     vfsmountresult.cpp configuration.cpp tofuinfo.cpp
37
38 gpgmepp_headers = \
39     assuanresult.h configuration.h context.h data.h decryptionresult.h \
40     defaultassuantransaction.h editinteractor.h encryptionresult.h \
41     engineinfo.h error.h eventloopinteractor.h exception.h global.h \
42     gpgadduserideditinteractor.h gpgagentgetinfoassuantransaction.h \
43     gpgmefw.h gpgsetexpirytimeeditinteractor.h \
44     gpgsetownertrusteditinteractor.h gpgsignkeyeditinteractor.h \
45     importresult.h keygenerationresult.h key.h keylistresult.h \
46     notation.h result.h scdgetinfoassuantransaction.h signingresult.h \
47     trustitem.h verificationresult.h vfsmountresult.h gpgmepp_export.h \
48     tofuinfo.h
49
50 private_gpgmepp_headers = \
51     result_p.h context_p.h util.h callbacks.h data_p.h
52
53 interface_headers= \
54     interfaces/assuantransaction.h interfaces/dataprovider.h \
55     interfaces/passphraseprovider.h interfaces/progressprovider.h
56
57 gpgmeppincludedir = $(includedir)/gpgme++
58 gpgmeppinclude_HEADERS = $(gpgmepp_headers)
59 nobase_gpgmeppinclude_HEADERS = $(interface_headers)
60 nodist_include_HEADERS = gpgmepp_version.h
61
62 libgpgmepp_la_SOURCES = $(main_sources) $(gpgmepp_headers) context_vanilla.cpp \
63                         $(interface_headers) $(private_gpgmepp_headers)
64
65 AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
66               -DBUILDING_GPGMEPP
67
68 libgpgmepp_la_LIBADD = ../../../src/libgpgme.la @LIBASSUAN_LIBS@
69 libgpgmepp_la_LDFLAGS = -version-info \
70     @LIBGPGMEPP_LT_CURRENT@:@LIBGPGMEPP_LT_REVISION@:@LIBGPGMEPP_LT_AGE@
71
72 if HAVE_W32_SYSTEM
73 libsuffix=.dll.a
74 else
75 libsuffix=.so
76 endif
77
78 GpgmeppConfig.cmake: GpgmeppConfig.cmake.in
79         sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" > "$@"
80         sed -e 's|[@]libsuffix@|$(libsuffix)|g' < "$@" > "$@".2
81         mv "$@".2 "$@"
82
83 install-cmake-files: GpgmeppConfig.cmake GpgmeppConfigVersion.cmake
84         -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp
85         $(INSTALL) GpgmeppConfig.cmake \
86         $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake
87         $(INSTALL) GpgmeppConfigVersion.cmake \
88         $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake
89
90 uninstall-cmake-files:
91         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake
92         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake
93         -rmdir $(DESTDIR)$(libdir)/cmake/Gpgmepp/
94
95 install-data-local: install-cmake-files
96
97 uninstall-local: uninstall-cmake-files
98
99 CLEANFILES = GpgmeppConfig.cmake