From fd7d7670a13078b985c570813e7e46c6b7f1feb7 Mon Sep 17 00:00:00 2001 From: mhubii Date: Fri, 23 Feb 2024 15:23:05 +0000 Subject: [PATCH] add version header https://github.com/lbr-stack/lbr_fri_ros2_stack/issues/156 --- CMakeLists.txt | 5 +++++ friVersion.h.in | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 friVersion.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt index f9e7467..18900c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,11 @@ endif() message("Found FRIClient of version: " ${FRICLIENT_VERSION}) +# create version header +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/friVersion.h.in ${CMAKE_CURRENT_BINARY_DIR}/${FRIClient_SDK_NAME}/include/friVersion.h +) + ################################# # define FRIClient library target ################################# diff --git a/friVersion.h.in b/friVersion.h.in new file mode 100644 index 0000000..a8e0de3 --- /dev/null +++ b/friVersion.h.in @@ -0,0 +1,7 @@ +#ifndef FRI_VERSION_H +#define FRI_VERSION_H + +#define FRICLIENT_VERSION_MAJOR @FRICLIENT_VERSION_MAJOR@ +#define FRICLIENT_VERSION_MINOR @FRICLIENT_VERSION_MINOR@ + +#endif // FRI_VERSION_H