[x265] [PATCH 1/2] Check if we are in a hg repository before running hg
Rafaël Carré
funman at videolan.org
Wed Dec 18 11:28:14 CET 2013
---
source/cmake/version.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/cmake/version.cmake b/source/cmake/version.cmake
index af16e28..0d2346f 100644
--- a/source/cmake/version.cmake
+++ b/source/cmake/version.cmake
@@ -29,7 +29,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/../.hg_archival.txt)
endif()
elseif(DEFINED ENV{X265_VERSION})
set(X265_VERSION $ENV{X265_REVISION})
-elseif(HG_EXECUTABLE)
+elseif(HG_EXECUTABLE AND EXISTS ${CMAKE_SOURCE_DIR}/../.hg)
execute_process(COMMAND
${HG_EXECUTABLE} log -r. --template "{latesttag}"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
--
1.8.5.2
More information about the x265-devel
mailing list