[x265] [PATCH] cmake: fix X265_VERSION not defined problem
Min Chen
chenm003 at 163.com
Sun Oct 6 04:26:17 CEST 2013
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1381026364 -28800
# Node ID 82d688c22244139df4fc986df60196c1e9541b3d
# Parent 4ee217cd64cc18a1f62fb8ef75c46240c123d1d9
cmake: fix X265_VERSION not defined problem
Some system install hg but the source tree isn't managed by HG,
In this time, we will build fail with error X265_VERSION macro
diff -r 4ee217cd64cc -r 82d688c22244 source/cmake/version.cmake
--- a/source/cmake/version.cmake Fri Oct 04 15:30:31 2013 -0500
+++ b/source/cmake/version.cmake Sun Oct 06 10:26:04 2013 +0800
@@ -28,7 +28,7 @@
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}
More information about the x265-devel
mailing list