Skip to content

Commit

Permalink
Modify VERSION info and rename config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Feb 27, 2024
1 parent 089d319 commit e1dd534
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion canfigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdlib.h> // free(), malloc()
#include <string.h>

#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);
Expand Down
3 changes: 1 addition & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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('.')

Expand Down

0 comments on commit e1dd534

Please sign in to comment.