[sword-svn] r3840 - trunk
scribe at crosswire.org
scribe at crosswire.org
Thu Dec 31 13:57:04 EST 2020
Author: scribe
Date: 2020-12-31 13:57:04 -0500 (Thu, 31 Dec 2020)
New Revision: 3840
Modified:
trunk/CMakeLists.txt
Log:
Fixed CMakeList.txt to properly include SVN revision number if within an SVN repository
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2020-12-27 19:17:40 UTC (rev 3839)
+++ trunk/CMakeLists.txt 2020-12-31 18:57:04 UTC (rev 3840)
@@ -11,9 +11,16 @@
# of their own GPLv2 license and all copyright is transferred to them for
# all posterity and eternity, wherever such transfer is possible. Where it is
# not, then this file is released under the GPLv2 by myself.
+
+include(FindSubversion)
+Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} MYSVN)
+
PROJECT(libsword CXX C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
-SET(SWORD_VERSION 1.9.0.svnversion)
+SET(SWORD_VERSION 1.9.0)
+if(DEFINED MYSVN_WC_REVISION)
+ SET(SWORD_VERSION ${SWORD_VERSION}.${MYSVN_WC_REVISION})
+endif(DEFINED MYSVN_WC_REVISION)
# Make sure it's an out-of-stream build
IF(${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
More information about the sword-cvs
mailing list