From 7ca6b69f9dba3e7d3621c5b624539925177d2ab0 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Tue, 31 May 2022 13:00:33 +0200 Subject: [PATCH] version info added --- CMakeLists.txt | 4 +++- config.h.in | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 config.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt index ccf24b6..d67d624 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,9 @@ set(PICO_SDK_PATH "/usr/share/pico-sdk") # Pull in Raspberry Pi Pico SDK (must be before project) include(pico_sdk_import.cmake) -project(gbmanager C CXX ASM) +project(gbmanager VERSION "1.0.0" LANGUAGES C CXX ASM) + +configure_file(config.h.in ${PROJECT_BINARY_DIR}/config.h) # Initialise the Raspberry Pi Pico SDK pico_sdk_init() diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..b3f9bae --- /dev/null +++ b/config.h.in @@ -0,0 +1,6 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#cmakedefine PROJECT_VERSION "@PROJECT_VERSION@" + +#endif \ No newline at end of file