summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-07-20 08:24:35 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-07-20 08:24:35 -0400
commita59acebb93a89fd560b947333b1d37d1d177ce10 (patch)
tree1d91037d8bc05bf216440a87e4160c55c32c2d39
parent36fa03dc7b96994a86db9fa7a51e8dd654c27b14 (diff)
added version info
-rw-r--r--CMakeLists.txt15
-rw-r--r--instr-client.c3
-rw-r--r--socket-common.h2
3 files changed, 18 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f63209..95d9ddc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,18 @@
cmake_minimum_required(VERSION 2.8)
-project(glib-sock-serv)
+
+project(Instrument)
+set(FW_VERSION 5.00)
+
+# configure a header file to pass some of the CMake settings
+# to the source code
+configure_file (
+ "${PROJECT_SOURCE_DIR}/version.h.in"
+ "${PROJECT_BINARY_DIR}/version.h"
+)
+
+# add the binary tree to the search path for include files
+# so that we will find TutorialConfig.h
+include_directories("${PROJECT_BINARY_DIR}")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
find_package(Glib)
diff --git a/instr-client.c b/instr-client.c
index a80a0e3..c020e65 100644
--- a/instr-client.c
+++ b/instr-client.c
@@ -2,6 +2,7 @@
#include <gio/gio.h>
#include <string.h>
#include "response.h"
+#include "version.h"
#include <stdlib.h>
#include <strings.h>
@@ -116,6 +117,8 @@ int main(int argc, char** argv)
g_object_unref(client);
return -1;
}
+
+ g_printf("Welcome to InstrumentShell v%.2f\n\n",FW_VERSION);
g_print("> ");
diff --git a/socket-common.h b/socket-common.h
index dfba8f8..4e4f694 100644
--- a/socket-common.h
+++ b/socket-common.h
@@ -5,7 +5,7 @@
#include <gio/gio.h>
#include <string.h>
-#define DEBUG_ON - uncomment this to have debug messages
+//#define DEBUG_ON - uncomment this to have debug messages
#ifdef DEBUG_ON
#define g_print_debug(...) g_print(__VA_ARGS__)