From e1dd53413e4f5fcfe29fd94ef0d12e1747b47aa3 Mon Sep 17 00:00:00 2001 From: andy5995 Date: Tue, 27 Feb 2024 11:31:59 -0600 Subject: [PATCH] Modify VERSION info and rename config.h --- canfigger.c | 7 ++++++- meson.build | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/canfigger.c b/canfigger.c index 2ec6eee..34fb80a 100644 --- a/canfigger.c +++ b/canfigger.c @@ -24,7 +24,12 @@ along with this program. If not, see . #include // free(), malloc() #include -#include "canfigger_config.h" +// This is only required for version info and can be removed +// if you're copying the canfigger source files to use as +// an embedded library with your own project (i.e., not building +// canfigger with the build system it's shipped with). +#include "config.h" + #include "canfigger.h" static char *grab_str_segment(char *a, char **dest, const int c); diff --git a/meson.build b/meson.build index a664925..dc2d598 100644 --- a/meson.build +++ b/meson.build @@ -28,11 +28,10 @@ minor_version = version_components[1] patch_version = version_components[2] conf = configuration_data() -conf.set_quoted('CANFIGGER_VERSION', meson.project_version()) conf.set('CANFIGGER_VERSION_MAJOR', major_version) conf.set('CANFIGGER_VERSION_MINOR', minor_version) conf.set('CANFIGGER_VERSION_PATCH', patch_version) -config_h = configure_file(output : 'canfigger_config.h', configuration : conf) +config_h = configure_file(output : 'config.h', configuration : conf) inc = include_directories('.')