summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSven Strickroth <email@cs-ware.de>2011-10-09 18:37:41 +0200
committerSven Strickroth <email@cs-ware.de>2011-10-09 18:39:52 +0200
commit96fab093e3d7fa15e5085f36c51841fa6628cbe9 (patch)
treea9cfa148e892cb5ee3938f99fc0c6f5315acd5d8 /CMakeLists.txt
parentda2281c7c0c450922533f6ee637d7bf59abc0fa3 (diff)
downloadlibgit2-96fab093e3d7fa15e5085f36c51841fa6628cbe9.tar.gz
put version information in separate file
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d517a74d0..a2fad2d10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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}")