mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 18:30:56 +00:00
put version information in separate file
Signed-off-by: Sven Strickroth <email@cs-ware.de>
This commit is contained in:
parent
da2281c7c0
commit
96fab093e3
@ -14,7 +14,7 @@
|
||||
PROJECT(libgit2 C)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
FILE(STRINGS "include/git2.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$")
|
||||
FILE(STRINGS "include/git2/version.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$")
|
||||
|
||||
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"([0-9]+).*$" "\\1" LIBGIT2_VERSION_MAJOR "${GIT2_HEADER}")
|
||||
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_MINOR "${GIT2_HEADER}")
|
||||
|
@ -8,10 +8,7 @@
|
||||
#ifndef INCLUDE_git_git_h__
|
||||
#define INCLUDE_git_git_h__
|
||||
|
||||
#define LIBGIT2_VERSION "0.15.0"
|
||||
#define LIBGIT2_VER_MAJOR 0
|
||||
#define LIBGIT2_VER_MINOR 15
|
||||
#define LIBGIT2_VER_REVISION 0
|
||||
#include "git2/version.h"
|
||||
|
||||
#include "git2/common.h"
|
||||
#include "git2/errors.h"
|
||||
|
15
include/git2/version.h
Normal file
15
include/git2/version.h
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2011 the libgit2 contributors
|
||||
*
|
||||
* This file is part of libgit2, distributed under the GNU GPL v2 with
|
||||
* a Linking Exception. For full terms see the included COPYING file.
|
||||
*/
|
||||
#ifndef INCLUDE_git_version_h__
|
||||
#define INCLUDE_git_version_h__
|
||||
|
||||
#define LIBGIT2_VERSION "0.15.0"
|
||||
#define LIBGIT2_VER_MAJOR 0
|
||||
#define LIBGIT2_VER_MINOR 15
|
||||
#define LIBGIT2_VER_REVISION 0
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user