[x265] [X265] [Patch] [Master, Release 3.5] Fixes cmake backward compatibility issues for version control script

Srikanth Kurapati srikanth.kurapati at multicorewareinc.com
Wed Jan 6 07:03:09 UTC 2021


>From 1983a69a00424bed9f66b34bddf09cd2165b31c1 Mon Sep 17 00:00:00 2001
From: Srikanth Kurapati <srikanth.kurapati at multicorewareinc.com>
Date: Thu, 31 Dec 2020 16:35:27 +0530
Subject: [PATCH] Fixes cmake backward compatibility issues for version
control
 script

---
 source/cmake/Version.cmake | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source/cmake/Version.cmake b/source/cmake/Version.cmake
index a3988d3..3bbf42f 100644
--- a/source/cmake/Version.cmake
+++ b/source/cmake/Version.cmake
@@ -48,7 +48,7 @@ if(HG_EXECUTABLE)
     endif()
 endif(HG_EXECUTABLE)
 find_package(Git QUIET) #No restrictions on Git versions used, any
versions from 1.8.x to 2.2.x or later should do.
-if(Git_FOUND)
+if(GIT_FOUND)
     find_program(GIT_EXECUTABLE git)
     message(STATUS "GIT_EXECUTABLE ${GIT_EXECUTABLE}")
     if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
@@ -56,7 +56,7 @@ if(Git_FOUND)
     elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../x265Version.txt)
         set(GIT_ARCHETYPE "1")
     endif()
-endif(Git_FOUND)
+endif(GIT_FOUND)
 if(HG_ARCHETYPE)
     #Read the lines of the archive summary file to extract the version
     message(STATUS "SOURCE CODE IS FROM x265 HG ARCHIVED ZIP OR TAR BALL")
@@ -122,7 +122,7 @@ elseif(GIT_ARCHETYPE)
         set(X265_LATEST_TAG ${git_releasetag})
         if(DEFINED git_releasetagdistance)
             set(X265_TAG_DISTANCE ${git_releasetagdistance})
-            if(X265_TAG_DISTANCE STRGREATER_EQUAL "0")
+            if(X265_TAG_DISTANCE STRGREATER "0" OR X265_TAG_DISTANCE
STREQUAL "0")
                 #for x265 the repository changeset has to be a tag id or
commit id after the tag
                 #hence mandating it's presence in version file always for
valid tag distances.
                 if(DEFINED git_repositorychangeset)
-- 
1.8.3.1


-- 
*With Regards,*
*Srikanth Kurapati.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20210106/12f88de4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixes-cmake-backward-compatibility-issues-for-versio.patch
Type: application/octet-stream
Size: 1826 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20210106/12f88de4/attachment.obj>


More information about the x265-devel mailing list