Mercurial > x265
changeset 12709:55827a4c4222 draft
Fixes cmake backward compatibility issues for version control script
author | Srikanth Kurapati <srikanth.kurapati@multicorewareinc.com> |
---|---|
date | Thu, 31 Dec 2020 16:35:27 +0530 |
parents | 26a1ee003d4b |
children | 5d6d5931e83c |
files | source/cmake/Version.cmake |
diffstat | 1 files changed, 3 insertions(+-), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/source/cmake/Version.cmake Wed Dec 16 10:52:33 2020 +0530 +++ b/source/cmake/Version.cmake Thu Dec 31 16:35:27 2020 +0530 @@ -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)