diff options
-rw-r--r-- | CMakeLists.txt | 15 | ||||
-rw-r--r-- | instr-client.c | 3 | ||||
-rw-r--r-- | 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 <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__) |