From e928ce51bd8c26742abfd537b054483a18a9689c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 30 Jun 2023 02:37:27 +0200 Subject: show git hash with --version Also, use cmake's configure_file to build string constants in. --- src/const.c.template | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/const.c.template (limited to 'src/const.c.template') diff --git a/src/const.c.template b/src/const.c.template new file mode 100644 index 0000000..5afd8ad --- /dev/null +++ b/src/const.c.template @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2023 Egor Tensin + * This file is part of the "cimple" project. + * For details, see https://github.com/egor-tensin/cimple. + * Distributed under the MIT License. + */ + +const char *project_version = "@PROJECT_VERSION@"; +const char *project_rev = "@PROJECT_REV@"; + +const char *default_host = "@DEFAULT_HOST@"; +const char *default_port = "@DEFAULT_PORT@"; +const char *default_sqlite_path = "@DEFAULT_SQLITE_PATH@"; -- cgit v1.2.3