[Bf-blender-cvs] [c8ebc87] master: CMake: Fix building w/o FindGit
Campbell Barton
noreply at git.blender.org
Wed Sep 2 17:33:37 CEST 2015
Commit: c8ebc8736ee6d211bd48d761374f9b5612584b90
Author: Campbell Barton
Date: Thu Sep 3 00:41:07 2015 +1000
Branches: master
https://developer.blender.org/rBc8ebc8736ee6d211bd48d761374f9b5612584b90
CMake: Fix building w/o FindGit
===================================================================
M build_files/cmake/buildinfo.cmake
M build_files/cmake/packaging.cmake
===================================================================
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake
index 756928a..81b0c1b 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -10,7 +10,7 @@ set(MY_WC_COMMIT_TIMESTAMP 0)
# Guess if this is a git working copy and then look up the revision
if(EXISTS ${SOURCE_DIR}/.git)
# The FindGit.cmake module is part of the standard distribution
- include(FindGit)
+ find_package(Git)
if(GIT_FOUND)
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake
index b2b14a5..f1939cf 100644
--- a/build_files/cmake/packaging.cmake
+++ b/build_files/cmake/packaging.cmake
@@ -21,7 +21,7 @@ SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
# Get the build revision, note that this can get out-of-sync, so for packaging run cmake first.
set(MY_WC_HASH "unknown")
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
- include(FindGit)
+ find_package(Git)
if(GIT_FOUND)
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --short HEAD
More information about the Bf-blender-cvs
mailing list