diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-01-23 15:07:01 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-01-23 15:07:01 -0800 |
| commit | d8093fd6c192d900082eb8d78a385ca1e13effa8 (patch) | |
| tree | 4e938825ed59830afa28e6f2e5860718808f9397 | |
| parent | Merge branch 'en/object-name-with-funny-refname-fix' (diff) | |
| parent | meson: ensure correct version-def.h is used (diff) | |
| download | git-d8093fd6c192d900082eb8d78a385ca1e13effa8.tar.gz git-d8093fd6c192d900082eb8d78a385ca1e13effa8.zip | |
Merge branch 'tc/meson-use-our-version-def-h'
The meson build procedure looked for the 'version-def.h' file in a
wrong directory, which has been corrected.
* tc/meson-use-our-version-def-h:
meson: ensure correct version-def.h is used
| -rw-r--r-- | meson.build | 4 | ||||
| -rw-r--r-- | version.c | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 7361eb2eaa..623caf7d5e 100644 --- a/meson.build +++ b/meson.build @@ -1513,7 +1513,9 @@ libgit_version_library = static_library('git-version', 'version.c', version_def_h, ], - c_args: libgit_c_args, + c_args: libgit_c_args + [ + '-DGIT_VERSION_H="' + version_def_h.full_path() + '"', + ], dependencies: libgit_dependencies, include_directories: libgit_include_directories, ) @@ -1,8 +1,13 @@ #include "git-compat-util.h" #include "version.h" -#include "version-def.h" #include "strbuf.h" +#ifndef GIT_VERSION_H +# include "version-def.h" +#else +# include GIT_VERSION_H +#endif + const char git_version_string[] = GIT_VERSION; const char git_built_from_commit_string[] = GIT_BUILT_FROM_COMMIT; |
