CMake: Fix building outside of a working copy when subversion is installed.

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1054 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
bgk 2011-12-27 21:02:22 +00:00
parent cc39456d49
commit 7bf04a5889
1 changed files with 9 additions and 7 deletions

View File

@ -35,13 +35,15 @@ endif( NOT ENABLE_DEBUGGER AND ENABLE_SDL )
# Set the version number with -DVERSION=X.X.X-uber
IF( NOT VERSION )
FIND_PACKAGE(Subversion)
IF(SUBVERSION_FOUND)
Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} SVN_INFO)
SET( VERSION "1.8.0-SVN${SVN_INFO_WC_REVISION}" )
ELSE(SUBVERSION_FOUND)
SET( VERSION "1.8.0-SVN" )
ENDIF(SUBVERSION_FOUND)
SET( VERSION "1.8.0-SVN" )
IF(EXISTS "${CMAKE_SOURCE_DIR}/.svn")
FIND_PACKAGE(Subversion)
IF(SUBVERSION_FOUND)
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} SVN_INFO)
SET( VERSION "1.8.0-SVN${SVN_INFO_WC_REVISION}" )
ENDIF(SUBVERSION_FOUND)
ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/.svn")
ENDIF( NOT VERSION )
# Fill in SDLMAIN_LIBRARY on OS X manually to avoid using SDLMain.m