From 965d639446f59e80eb1b2fee7556abfd6eddecf7 Mon Sep 17 00:00:00 2001
From: Christian Schmitt <chris@ilovelinux.de>
Date: Sun, 9 Dec 2012 18:36:03 +0100
Subject: [PATCH] Add versioning to tg-construct, hgtchop and ogr-decode

---
 src/BuildTiles/Main/main.cxx      | 3 ++-
 src/Prep/DemChop/hgtchop.cxx      | 5 +++--
 src/Prep/OGRDecode/ogr-decode.cxx | 3 +++
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/BuildTiles/Main/main.cxx b/src/BuildTiles/Main/main.cxx
index 012938cf..946524cf 100644
--- a/src/BuildTiles/Main/main.cxx
+++ b/src/BuildTiles/Main/main.cxx
@@ -29,7 +29,7 @@
 #endif
 
 #include <simgear/debug/logstream.hxx>
-
+#include <Include/version.h>
 #include <Geometry/poly_support.hxx>
 
 #include "tgconstruct.hxx"
@@ -131,6 +131,7 @@ int main(int argc, char **argv) {
         share_dir = work_dir + "/Shared";
     }
 
+    SG_LOG(SG_GENERAL, SG_ALERT, "tg-construct version " << getTGVersion() << "\n");
     SG_LOG(SG_GENERAL, SG_ALERT, "Output directory is " << output_dir);
     SG_LOG(SG_GENERAL, SG_ALERT, "Working directory is " << work_dir);
     SG_LOG(SG_GENERAL, SG_ALERT, "Shared directory is " << share_dir);
diff --git a/src/Prep/DemChop/hgtchop.cxx b/src/Prep/DemChop/hgtchop.cxx
index b146a627..4cc4a665 100644
--- a/src/Prep/DemChop/hgtchop.cxx
+++ b/src/Prep/DemChop/hgtchop.cxx
@@ -19,7 +19,6 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 //
-// $Id: hgtchop.cxx,v 1.7 2007-08-15 14:35:36 curt Exp $
 
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
@@ -35,6 +34,7 @@
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/misc/sg_dir.hxx>
 
+#include <Include/version.h>
 #include <HGT/hgt.hxx>
 
 #include <stdlib.h>
@@ -46,6 +46,7 @@ using std::string;
 
 int main(int argc, char **argv) {
     sglog().setLogLevels( SG_ALL, SG_WARN );
+    SG_LOG( SG_GENERAL, SG_ALERT, "hgtchop version " << getTGVersion() << "\n" );
 
     if ( argc != 4 ) {
 	cout << "Usage " << argv[0] << " <resolution> <hgt_file> <work_dir>"
@@ -107,4 +108,4 @@ int main(int argc, char **argv) {
     }
 
     return 0;
-}
\ No newline at end of file
+}
diff --git a/src/Prep/OGRDecode/ogr-decode.cxx b/src/Prep/OGRDecode/ogr-decode.cxx
index 1a2cc1eb..f860a384 100644
--- a/src/Prep/OGRDecode/ogr-decode.cxx
+++ b/src/Prep/OGRDecode/ogr-decode.cxx
@@ -33,6 +33,7 @@
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/misc/sg_path.hxx>
 
+#include <Include/version.h>
 #include <Geometry/line.hxx>
 #include <Geometry/util.hxx>
 #include <Polygon/chop.hxx>
@@ -671,6 +672,8 @@ int main( int argc, char **argv ) {
 		break;
     }
 
+    SG_LOG( SG_GENERAL, SG_ALERT, "ogr-decode version " << getTGVersion() << "\n" );
+
     if (argc<3)
 	usage(progname);