From a59acebb93a89fd560b947333b1d37d1d177ce10 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Fri, 20 Jul 2012 08:24:35 -0400 Subject: added version info --- CMakeLists.txt | 15 ++++++++++++++- instr-client.c | 3 +++ socket-common.h | 2 +- 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 #include #include "response.h" +#include "version.h" #include #include @@ -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 #include -#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__) -- cgit