cpp, qt: Handle modified includedir installation
[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              gpgme_backend_debug.h qgpgme_version.h.in
23
24 qgpgme_sources = \
25     dataprovider.cpp job.cpp qgpgmeadduseridjob.cpp \
26     qgpgmebackend.cpp qgpgmechangeexpiryjob.cpp qgpgmechangeownertrustjob.cpp \
27     qgpgmechangepasswdjob.cpp qgpgmedecryptjob.cpp \
28     qgpgmedecryptverifyjob.cpp qgpgmedeletejob.cpp qgpgmedownloadjob.cpp \
29     qgpgmeencryptjob.cpp qgpgmeexportjob.cpp qgpgmeimportfromkeyserverjob.cpp \
30     qgpgmeimportjob.cpp qgpgmekeygenerationjob.cpp qgpgmekeylistjob.cpp \
31     qgpgmelistallkeysjob.cpp qgpgmenewcryptoconfig.cpp \
32     qgpgmerefreshkeysjob.cpp \
33     qgpgmesecretkeyexportjob.cpp qgpgmesignencryptjob.cpp \
34     qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \
35     qgpgmeverifyopaquejob.cpp threadedjobmixin.cpp \
36     qgpgmekeyformailboxjob.cpp gpgme_backend_debug.cpp \
37     qgpgmetofupolicyjob.cpp \
38     defaultkeygenerationjob.cpp qgpgmewkspublishjob.cpp
39
40 # If you add one here make sure that you also add one in camelcase
41 qgpgme_headers= \
42     adduseridjob.h \
43     changeexpiryjob.h \
44     changeownertrustjob.h \
45     changepasswdjob.h \
46     dataprovider.h \
47     decryptjob.h \
48     decryptverifyjob.h \
49     downloadjob.h \
50     encryptjob.h \
51     exportjob.h \
52     hierarchicalkeylistjob.h \
53     job.h \
54     keyformailboxjob.h \
55     multideletejob.h \
56     protocol.h \
57     qgpgme_export.h \
58     qgpgmenewcryptoconfig.h \
59     signjob.h \
60     signkeyjob.h \
61     signencryptjob.h \
62     verifyopaquejob.h \
63     refreshkeysjob.h \
64     cryptoconfig.h \
65     deletejob.h \
66     importfromkeyserverjob.h \
67     importjob.h \
68     keygenerationjob.h \
69     keylistjob.h \
70     listallkeysjob.h \
71     verifydetachedjob.h \
72     defaultkeygenerationjob.h \
73     tofupolicyjob.h \
74     wkspublishjob.h
75
76 camelcase_headers= \
77     AddUserIDJob \
78     ChangeExpiryJob \
79     ChangeOwnerTrustJob \
80     ChangePasswdJob \
81     DataProvider \
82     DecryptJob \
83     DecryptVerifyJob \
84     DownloadJob \
85     EncryptJob \
86     ExportJob \
87     HierarchicalKeyKistJob \
88     Job \
89     MultiDeleteJob \
90     Protocol \
91     QGpgMENewCryptoConfig \
92     SignJob \
93     SignKeyJob \
94     SignEncryptJob \
95     VerifyOpaqueJob \
96     RefreshKeysJob \
97     CryptoConfig \
98     DeleteJob \
99     ImportFromKeyserverJob \
100     ImportJob \
101     KeyGenerationJob \
102     KeyListJob \
103     ListAllKeysJob \
104     VerifyDetachedJob \
105     KeyForMailboxJob \
106     DefaultKeyGenerationJob \
107     WKSPublishJob \
108     TofuPolicyJob
109
110 private_qgpgme_headers = \
111     qgpgme_export.h \
112     abstractimportjob.h \
113     protocol_p.h \
114     qgpgmeadduseridjob.h \
115     qgpgmebackend.h \
116     qgpgmechangeexpiryjob.h \
117     qgpgmechangeownertrustjob.h \
118     qgpgmechangepasswdjob.h \
119     qgpgmedecryptjob.h \
120     qgpgmedecryptverifyjob.h \
121     qgpgmedeletejob.h \
122     qgpgmedownloadjob.h \
123     qgpgmeencryptjob.h \
124     qgpgmeexportjob.h \
125     qgpgmeimportfromkeyserverjob.h \
126     qgpgmeimportjob.h \
127     qgpgmekeygenerationjob.h \
128     qgpgmekeylistjob.h \
129     qgpgmelistallkeysjob.h \
130     qgpgmerefreshkeysjob.h \
131     qgpgmesecretkeyexportjob.h \
132     qgpgmesignencryptjob.h \
133     qgpgmesignjob.h \
134     qgpgmesignkeyjob.h \
135     qgpgmeverifydetachedjob.h \
136     qgpgmeverifyopaquejob.h \
137     qgpgmekeyformailboxjob.h \
138     qgpgmewkspublishjob.h \
139     qgpgmetofupolicyjob.h \
140     specialjob.h \
141     threadedjobmixin.h
142
143 qgpgme_moc_sources = \
144     abstractimportjob.moc \
145     adduseridjob.moc \
146     changeexpiryjob.moc \
147     changeownertrustjob.moc \
148     changepasswdjob.moc \
149     decryptjob.moc \
150     decryptverifyjob.moc \
151     deletejob.moc \
152     downloadjob.moc \
153     encryptjob.moc \
154     exportjob.moc \
155     hierarchicalkeylistjob.moc \
156     importfromkeyserverjob.moc \
157     importjob.moc \
158     job.moc \
159     keygenerationjob.moc \
160     keylistjob.moc \
161     listallkeysjob.moc \
162     multideletejob.moc \
163     qgpgmeadduseridjob.moc \
164     qgpgmechangeexpiryjob.moc \
165     qgpgmechangeownertrustjob.moc \
166     qgpgmechangepasswdjob.moc \
167     qgpgmedecryptjob.moc \
168     qgpgmedecryptverifyjob.moc \
169     qgpgmedeletejob.moc \
170     qgpgmedownloadjob.moc \
171     qgpgmeencryptjob.moc \
172     qgpgmeexportjob.moc \
173     qgpgmeimportfromkeyserverjob.moc \
174     qgpgmeimportjob.moc \
175     qgpgmekeygenerationjob.moc \
176     qgpgmekeylistjob.moc \
177     qgpgmelistallkeysjob.moc \
178     qgpgmerefreshkeysjob.moc \
179     qgpgmesecretkeyexportjob.moc \
180     qgpgmesignencryptjob.moc \
181     qgpgmesignjob.moc \
182     qgpgmesignkeyjob.moc \
183     qgpgmeverifydetachedjob.moc \
184     qgpgmeverifyopaquejob.moc \
185     qgpgmewkspublishjob.moc \
186     tofupolicyjob.moc \
187     qgpgmetofupolicyjob.moc \
188     refreshkeysjob.moc \
189     signencryptjob.moc \
190     signjob.moc \
191     signkeyjob.moc \
192     specialjob.moc \
193     verifydetachedjob.moc \
194     verifyopaquejob.moc \
195     keyformailboxjob.moc \
196     wkspublishjob.moc \
197     qgpgmekeyformailboxjob.moc \
198     defaultkeygenerationjob.moc
199
200 qgpgmeincludedir = $(includedir)/qgpgme
201 qgpgmeinclude_HEADERS = $(qgpgme_headers)
202 camelcaseincludedir = $(includedir)/QGpgME
203 camelcaseinclude_HEADERS = $(camelcase_headers)
204 nodist_include_HEADERS = qgpgme_version.h
205
206 libqgpgme_la_SOURCES = $(qgpgme_sources) $(qgpgme_headers) $(private_qgpgme_headers)
207
208 AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
209               @GPGME_QT_CFLAGS@ @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
210               -DBUILDING_QGPGME
211
212 libqgpgme_la_LIBADD = ../../cpp/src/libgpgmepp.la ../../../src/libgpgme.la \
213                        @LIBASSUAN_LIBS@ @GPGME_QT_LIBS@
214 libqgpgme_la_LDFLAGS = -version-info \
215     @LIBQGPGME_LT_CURRENT@:@LIBQGPGME_LT_REVISION@:@LIBQGPGME_LT_AGE@
216
217 if HAVE_W32_SYSTEM
218 libsuffix=.dll.a
219 else
220 libsuffix=.so
221 endif
222
223 QGpgmeConfig.cmake: QGpgmeConfig.cmake.in
224         sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \
225         sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \
226         sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@
227
228 $(camelcase_headers): Makefile.am
229         echo -n "#include \"qgpgme/" > "$@"
230         echo -n "$@" | tr '[:upper:]' '[:lower:]' >> "$@"
231         echo ".h\"" >> "$@"
232
233 install-cmake-files: QGpgmeConfig.cmake QGpgmeConfigVersion.cmake
234         -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp
235         $(INSTALL) QGpgmeConfig.cmake \
236         $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfig.cmake
237         $(INSTALL) QGpgmeConfigVersion.cmake \
238         $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfigVersion.cmake
239
240 uninstall-cmake-files:
241         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfigVersion.cmake
242         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfig.cmake
243         -rmdir $(DESTDIR)$(libdir)/cmake/Gpgmepp/
244
245 install-data-local: install-cmake-files
246
247 uninstall-local: uninstall-cmake-files
248
249 BUILT_SOURCES = $(qgpgme_moc_sources) $(camelcase_headers)
250
251 CLEANFILES = $(qgpgme_moc_sources) $(camelcase_headers) QGpgmeConfig.cmake
252
253 nodist_libqgpgme_la_SOURCES = $(qgpgme_moc_sources)
254
255 .h.moc:
256         $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@