From 7429211aee3daa4227e10d2541920c0dea785191 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Tue, 22 Oct 2019 12:01:54 +0200 Subject: [HICN-346] Add version of the transport library in the config.h header file. Change-Id: I1ce0b705db98f4042470a7b80b422720ba03c0f6 Signed-off-by: Mauro Sardara --- libtransport/src/hicn/transport/CMakeLists.txt | 2 ++ libtransport/src/hicn/transport/config.h.in | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'libtransport/src/hicn') diff --git a/libtransport/src/hicn/transport/CMakeLists.txt b/libtransport/src/hicn/transport/CMakeLists.txt index 6e0ae5b88..22acdcb7f 100644 --- a/libtransport/src/hicn/transport/CMakeLists.txt +++ b/libtransport/src/hicn/transport/CMakeLists.txt @@ -25,6 +25,8 @@ add_subdirectory(portability) add_subdirectory(protocols) add_subdirectory(utils) +include(Packager) +extract_version() configure_file("config.h.in" "config.h" @ONLY) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h diff --git a/libtransport/src/hicn/transport/config.h.in b/libtransport/src/hicn/transport/config.h.in index 7d47c2b3f..ef47affda 100644 --- a/libtransport/src/hicn/transport/config.h.in +++ b/libtransport/src/hicn/transport/config.h.in @@ -17,6 +17,10 @@ #cmakedefine TRANSPORT_HAVE_PTHREAD 1 +#define HICNTRANSPORT_VERSION_MAJOR "@VERSION_MAJOR@" +#define HICNTRANSPORT_VERSION_MINOR "@VERSION_MINOR@" +#define HICNTRANSPORT_VERSION_REVISION "@VERSION_REVISION@" + #ifndef ASIO_STANDALONE #cmakedefine ASIO_STANDALONE #endif -- cgit 1.2.3-korg