@@ -1493,7 +1493,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;