Add qgpgme as qt language binding
[gpgme.git] / lang / qt / 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 lib_LTLIBRARIES = libqgpgme.la
21 EXTRA_DIST = QGpgmeConfig.cmake.in.in QGpgmeConfigVersion.cmake.in
22
23 qgpgme_sources = \
24     dataprovider.cpp
25
26 qgpgme_headers = \
27     dataprovider.h qgpgme_export.h
28
29 qgpgmeincludedir = $(includedir)/qgpgme
30 qgpgmeinclude_HEADERS = $(qgpgme_headers)
31
32 libqgpgme_la_SOURCES = $(qgpgme_sources) $(qgpgme_headers)
33
34 AM_CPPFLAGS = @GPGME_QT_CFLAGS@ @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
35               -DBUILDING_QGPGME -I$(top_srcdir)/lang/cpp/src
36
37 libqgpgme_la_LIBADD = ../../cpp/src/libgpgmepp.la ../../../src/libgpgme.la \
38                        @LIBASSUAN_LIBS@ @GPGME_QT_LIBS@
39 libqgpgme_la_LDFLAGS = -version-info \
40     @LIBQGPGME_LT_CURRENT@:@LIBQGPGME_LT_REVISION@:@LIBQGPGME_LT_AGE@
41
42 if HAVE_W32_SYSTEM
43 libsuffix=.dll.a
44 else
45 libsuffix=.so
46 endif
47
48 QGpgmeConfig.cmake: QGpgmeConfig.cmake.in
49         sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" > "$@"
50         sed -e 's|[@]libsuffix@|$(libsuffix)|g' < "$@" > "$@".2
51         mv "$@".2 "$@"
52
53 install-cmake-files: QGpgmeConfig.cmake QGpgmeConfigVersion.cmake
54         -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp
55         $(INSTALL) QGpgmeConfig.cmake \
56         $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfig.cmake
57         $(INSTALL) QGpgmeConfigVersion.cmake \
58         $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfigVersion.cmake
59
60 uninstall-cmake-files:
61         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfigVersion.cmake
62         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfig.cmake
63         -rmdir $(DESTDIR)$(libdir)/cmake/Gpgmepp/
64
65 install-data-local: install-cmake-files
66
67 uninstall-local: uninstall-cmake-files