# HG changeset patch # User sheepluva # Date 1390210859 -3600 # Node ID ec966363adbeeb83a3ec56ad221f8a39126a7902 # Parent 7d21f52f04528049f483827b413ff9b76236f2c8 new cmake option NOVERSIONINFOUPDATE -- to be used if source is in a git/repo that is NOT the hedgewars repo diff -r 7d21f52f0452 -r ec966363adbe CMakeLists.txt --- a/CMakeLists.txt Mon Jan 20 10:16:29 2014 +0100 +++ b/CMakeLists.txt Mon Jan 20 10:40:59 2014 +0100 @@ -38,6 +38,8 @@ set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path") endif() +option(NOVERSIONINFOUPDATE "Disable update of version_info.txt. To be used if source is in a git/repo that is NOT the hedgewars repo" OFF) + #system paths for finding required fonts (see share/hedgewars/Data/fonts) #subdirectories will NOT be searched. #all fonts that can't be found will be bundled with hedgewars diff -r 7d21f52f0452 -r ec966363adbe cmake_modules/revinfo.cmake --- a/cmake_modules/revinfo.cmake Mon Jan 20 10:16:29 2014 +0100 +++ b/cmake_modules/revinfo.cmake Mon Jan 20 10:40:59 2014 +0100 @@ -1,7 +1,7 @@ #detect Mercurial revision and init rev/hash information find_program(HGCOMMAND hg) find_program(GITCOMMAND git) -if(EXISTS ${CMAKE_SOURCE_DIR}/.hg AND HGCOMMAND) +if(EXISTS ${CMAKE_SOURCE_DIR}/.hg AND HGCOMMAND AND NOT NOVERSIONINFOUPDATE) execute_process(COMMAND ${HGCOMMAND} identify -in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE internal_version @@ -21,7 +21,7 @@ #write down hash and rev for easy picking should hg be missing file(WRITE "${CMAKE_SOURCE_DIR}/share/version_info.txt" "Hedgewars versioning information, do not modify\nrev ${HEDGEWARS_REVISION}\nhash ${HEDGEWARS_HASH}\n") -elseif(EXISTS ${CMAKE_SOURCE_DIR}/.git AND GITCOMMAND) +elseif(EXISTS ${CMAKE_SOURCE_DIR}/.git AND GITCOMMAND AND NOT NOVERSIONINFOUPDATE) execute_process(COMMAND ${GITCOMMAND} rev-parse --short HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE HEDGEWARS_HASH