Qt/Cpp: Add version headers
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 12 Jul 2016 09:09:44 +0000 (11:09 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Tue, 12 Jul 2016 09:35:39 +0000 (11:35 +0200)
* lang/cpp/src/gpgmepp_version.h.in,
lang/qt/src/qgpgme_version.h.in: New. Version information.
* lang/qt/src/Makefile.am, lang/cpp/src/Makefile.am: Add them.
* configure.ac: Configure them.

--
The version headers are common practice in KDE Frameworks and
were installed for KF5Gpgmepp and Libkleo respectively.

configure.ac
lang/cpp/src/Makefile.am
lang/cpp/src/gpgmepp_version.h.in [new file with mode: 0644]
lang/qt/src/Makefile.am
lang/qt/src/qgpgme_version.h.in [new file with mode: 0644]

index 335a33a..52ba87f 100644 (file)
@@ -768,10 +768,12 @@ AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
 AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile)
 AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in)
 AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfigVersion.cmake)
 AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile)
 AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in)
 AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfigVersion.cmake)
+AC_CONFIG_FILES(lang/cpp/src/gpgmepp_version.h)
 AC_CONFIG_FILES(lang/qt/Makefile lang/qt/src/Makefile)
 AC_CONFIG_FILES(lang/qt/src/QGpgmeConfig.cmake.in)
 AC_CONFIG_FILES(lang/qt/src/QGpgmeConfigVersion.cmake)
 AC_CONFIG_FILES(lang/qt/tests/Makefile)
 AC_CONFIG_FILES(lang/qt/Makefile lang/qt/src/Makefile)
 AC_CONFIG_FILES(lang/qt/src/QGpgmeConfig.cmake.in)
 AC_CONFIG_FILES(lang/qt/src/QGpgmeConfigVersion.cmake)
 AC_CONFIG_FILES(lang/qt/tests/Makefile)
+AC_CONFIG_FILES(lang/qt/src/qgpgme_version.h)
 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
 AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([lang/qt/doc/Doxyfile])])
 AC_CONFIG_FILES(lang/qt/doc/Makefile)
 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
 AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([lang/qt/doc/Doxyfile])])
 AC_CONFIG_FILES(lang/qt/doc/Makefile)
index e9deca9..188585a 100644 (file)
@@ -18,7 +18,8 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA
 
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA
 
-EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in
+EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in \
+             gpgmepp_version.h.in
 
 lib_LTLIBRARIES = libgpgmepp.la
 
 
 lib_LTLIBRARIES = libgpgmepp.la
 
@@ -56,6 +57,7 @@ interface_headers= \
 gpgmeppincludedir = $(includedir)/gpgme++
 gpgmeppinclude_HEADERS = $(gpgmepp_headers)
 nobase_gpgmeppinclude_HEADERS = $(interface_headers)
 gpgmeppincludedir = $(includedir)/gpgme++
 gpgmeppinclude_HEADERS = $(gpgmepp_headers)
 nobase_gpgmeppinclude_HEADERS = $(interface_headers)
+nodist_include_HEADERS = gpgmepp_version.h
 
 libgpgmepp_la_SOURCES = $(main_sources) $(gpgmepp_headers) context_vanilla.cpp \
                         $(interface_headers) $(private_gpgmepp_headers)
 
 libgpgmepp_la_SOURCES = $(main_sources) $(gpgmepp_headers) context_vanilla.cpp \
                         $(interface_headers) $(private_gpgmepp_headers)
diff --git a/lang/cpp/src/gpgmepp_version.h.in b/lang/cpp/src/gpgmepp_version.h.in
new file mode 100644 (file)
index 0000000..3c33a30
--- /dev/null
@@ -0,0 +1,32 @@
+/*gpgmepp_version.h - Version macros for gpgmepp
+  Copyright (C) 2016, Intevation GmbH
+
+  This file is part of GPGME++.
+
+  GPGME++ is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Library General Public
+  License as published by the Free Software Foundation; either
+  version 2 of the License, or (at your option) any later version.
+
+  GPGME++ is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU Library General Public License for more details.
+
+  You should have received a copy of the GNU Library General Public License
+  along with GPGME++; see the file COPYING.LIB.  If not, write to the
+  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+  Boston, MA 02110-1301, USA.
+*/
+
+
+#ifndef GPGMEPP_VERSION_H
+#define GPGMEPP_VERSION_H
+
+#define GPGMEPP_VERSION_STRING "@LIBGPGMEPP_LT_CURRENT@.@LIBGPGMEPP_LT_AGE@.@LIBGPGMEPP_LT_REVISION@"
+#define GPGMEPP_VERSION_MAJOR @LIBGPGMEPP_LT_CURRENT@
+#define GPGMEPP_VERSION_MINOR @LIBGPGMEPP_LT_AGE@
+#define GPGMEPP_VERSION_PATCH @LIBGPGMEPP_LT_REVISION@
+#define GPGMEPP_VERSION ((@LIBGPGMEPP_LT_CURRENT@<<16)|(@LIBGPGMEPP_LT_AGE@<<8)|(@LIBGPGMEPP_LT_REVISION@))
+
+#endif
index 187bc7f..3f5025c 100644 (file)
@@ -19,7 +19,7 @@
 # 02111-1307, USA
 lib_LTLIBRARIES = libqgpgme.la
 EXTRA_DIST = QGpgmeConfig.cmake.in.in QGpgmeConfigVersion.cmake.in \
 # 02111-1307, USA
 lib_LTLIBRARIES = libqgpgme.la
 EXTRA_DIST = QGpgmeConfig.cmake.in.in QGpgmeConfigVersion.cmake.in \
-             gpgme_backend_debug.h
+             gpgme_backend_debug.h qgpgme_version.h.in
 
 qgpgme_sources = \
     dataprovider.cpp job.cpp qgpgmeadduseridjob.cpp \
 
 qgpgme_sources = \
     dataprovider.cpp job.cpp qgpgmeadduseridjob.cpp \
@@ -148,6 +148,7 @@ qgpgme_moc_sources = \
 
 qgpgmeincludedir = $(includedir)/qgpgme
 qgpgmeinclude_HEADERS = $(qgpgme_headers)
 
 qgpgmeincludedir = $(includedir)/qgpgme
 qgpgmeinclude_HEADERS = $(qgpgme_headers)
+nodist_include_HEADERS = qgpgme_version.h
 
 libqgpgme_la_SOURCES = $(qgpgme_sources) $(qgpgme_headers) $(private_qgpgme_headers)
 
 
 libqgpgme_la_SOURCES = $(qgpgme_sources) $(qgpgme_headers) $(private_qgpgme_headers)
 
diff --git a/lang/qt/src/qgpgme_version.h.in b/lang/qt/src/qgpgme_version.h.in
new file mode 100644 (file)
index 0000000..9fbe965
--- /dev/null
@@ -0,0 +1,32 @@
+/*qgpgme_version.h - Version macros for qgpgme
+  Copyright (C) 2016, Intevation GmbH
+
+  This file is part of GPGME++.
+
+  GPGME++ is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Library General Public
+  License as published by the Free Software Foundation; either
+  version 2 of the License, or (at your option) any later version.
+
+  GPGME++ is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU Library General Public License for more details.
+
+  You should have received a copy of the GNU Library General Public License
+  along with GPGME++; see the file COPYING.LIB.  If not, write to the
+  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+  Boston, MA 02110-1301, USA.
+*/
+
+
+#ifndef QGPGME_VERSION_H
+#define QGPGME_VERSION_H
+
+#define QGPGME_VERSION_STRING "@LIBQGPGME_LT_CURRENT@.@LIBQGPGME_LT_AGE@.@LIBQGPGME_LT_REVISION@"
+#define QGPGME_VERSION_MAJOR @LIBQGPGME_LT_CURRENT@
+#define QGPGME_VERSION_MINOR @LIBQGPGME_LT_AGE@
+#define QGPGME_VERSION_PATCH @LIBQGPGME_LT_REVISION@
+#define QGPGME_VERSION ((@LIBQGPGME_LT_CURRENT@<<16)|(@LIBQGPGME_LT_AGE@<<8)|(@LIBQGPGME_LT_REVISION@))
+
+#endif