build,cpp: Create forwarding headers in a gpgme++ folder

* lang/cpp/src/Makefile.am (copied_headers): New.
(build rule for all copied headers): New.
(BUILT_SOURCES): New.
(CLEANFILES): Add copied_headers.
--

The forwarding headers make it easier to use the headers from the Qt
bindings when building them against the built but not installed C++
bindings because we can always include the C++ headers with gpgme++/
prefix.

GnuPG-bug-id: 7110
This commit is contained in:
Ingo Klöcker 2024-05-24 10:40:53 +02:00
parent 87319b3fc7
commit 8be031ebdb
No known key found for this signature in database
GPG Key ID: F5A5D1692277A1E9

View File

@ -88,6 +88,14 @@ else
libsuffix=.so
endif
copied_headers = $(gpgmepp_headers:%=gpgme++/%) $(interface_headers:%=gpgme++/%)
$(copied_headers): Makefile.am
mkdir -p $(builddir)/gpgme++/interfaces
echo -n "#include \"$(srcdir)" > "$@"
echo -n "$@" | sed "s/gpgme++//" >> "$@"
echo "\"" >> "$@"
if HAVE_W32_SYSTEM
GpgmeppConfig.cmake: GpgmeppConfig-w32.cmake.in
sed -e 's|[@]resolved_bindir@|$(bindir)|g' < "$<" | \
@ -115,5 +123,8 @@ install-data-local: install-cmake-files
uninstall-local: uninstall-cmake-files
BUILT_SOURCES = $(copied_headers)
CLEANFILES = GpgmeppConfig.cmake GpgmeppConfigVersion.cmake \
gpgmepp_version.h GpgmeppConfig.cmake.in
gpgmepp_version.h GpgmeppConfig.cmake.in \
$(copied_headers)