aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-05 13:09:04 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-09-07 09:43:14 +0200
commit42da0c1455b0348c7163683023148ae37eb925e5 (patch)
treef8b9b19eb53fe2a6c38f9529fa3560cfff19a5cf
parent550b36945f2e9eae1fc4b822ea9a00a2a866eb83 (diff)
Set Version 4.1
Change-Id: I752ab6fa12de2d3a3b739c5d090d56222d0ac457 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--CMakeLists.txt13
-rw-r--r--src/afb-config.c23
2 files changed, 21 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1037b43e..c2ab4624 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,21 +16,22 @@
# limitations under the License.
###########################################################################
-PROJECT(afb-daemon C)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-SET(CMAKE_BUILD_TYPE Debug)
-SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
+PROJECT(afb-daemon C)
SET(PROJECT_NAME "AFB Daemon")
SET(PROJECT_PRETTY_NAME "Application Framework Binder Daemon")
SET(PROJECT_DESCRIPTION "Secured binder of API for clients of the Application framework")
-SET(PROJECT_VERSION "1.0")
+SET(PROJECT_VERSION "4.1")
SET(PROJECT_URL "https://github.com/iotbzh/afb-daemon")
SET(LIBAFBWSC_VERSION "1.0")
SET(LIBAFBWSC_SOVERSION "1")
+SET(CMAKE_BUILD_TYPE Debug)
+SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
INCLUDE(FindPkgConfig)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckLibraryExists)
@@ -95,6 +96,8 @@ IF(cynara_FOUND)
ADD_DEFINITIONS(-DBACKEND_PERMISSION_IS_CYNARA)
ENDIF(cynara_FOUND)
+ADD_DEFINITIONS(-DAFB_VERSION="${PROJECT_VERSION}")
+
INCLUDE_DIRECTORIES(
${INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/include
diff --git a/src/afb-config.c b/src/afb-config.c
index 7635575b..016da835 100644
--- a/src/afb-config.c
+++ b/src/afb-config.c
@@ -33,8 +33,9 @@
#if !defined(BINDING_INSTALL_DIR)
#error "you should define BINDING_INSTALL_DIR"
#endif
-
-#define AFB_VERSION "0.6"
+#if !defined(AFB_VERSION)
+#error "you should define AFB_VERSION"
+#endif
// default
#define DEFLT_CNTX_TIMEOUT 3600 // default Client Connection
@@ -229,14 +230,16 @@ static struct enumdesc mode_desc[] = {
+--------------------------------------------------------- */
static void printVersion(FILE * file)
{
- fprintf(file, "\n----------------------------------------- \n");
- fprintf(file, " AFB [Application Framework Binder] version=%s |\n",
- AFB_VERSION);
- fprintf(file, " \n");
- fprintf(file,
- " Copyright (C) 2015, 2016, 2017 \"IoT.bzh\" [fulup -at- iot.bzh]\n");
- fprintf(file, " AFB comes with ABSOLUTELY NO WARRANTY.\n");
- fprintf(file, " Licence Apache 2\n\n");
+ static const char version[] =
+ "\n"
+ " AFB [Application Framework Binder] version="AFB_VERSION"\n"
+ "\n"
+ " Copyright (C) 2015, 2016, 2017 \"IoT.bzh\"\n"
+ " AFB comes with ABSOLUTELY NO WARRANTY.\n"
+ " Licence Apache 2\n"
+ "\n";
+
+ fprintf(file, "%s", version);
}
/*----------------------------------------------------------