Explorar o código

Add rules for setversion.py to include CMakeLists.txt

hasufell %!s(int64=14) %!d(string=hai) anos
pai
achega
aba89e3f76
Modificáronse 1 ficheiros con 28 adicións e 0 borrados
  1. 28 0
      setversion.py

+ 28 - 0
setversion.py

@@ -77,3 +77,31 @@ def doxRule( line ):
 
 fileProcess( "dox", doxRule )
 
+
+#### Write the CMakeLists.txt ####
+
+def cmakeRule1( line ):
+
+	matchVersion = "set(GENERIC_LIB_VERSION"
+
+	if line[0:len(matchVersion)] == matchVersion:
+		print "1)tinyxml2.h Major found"
+		return matchVersion + " \"" + `major` + "." + `minor` + "." + `build` + "\")" + "\n"
+
+	else:
+		return line;
+
+fileProcess( "CMakeLists.txt", cmakeRule1 )
+
+def cmakeRule2( line ):
+
+	matchSoversion = "set(GENERIC_LIB_SOVERSION"
+
+	if line[0:len(matchSoversion)] == matchSoversion:
+		print "1)tinyxml2.h Major found"
+		return matchSoversion + " \"" + `major` + "\")" + "\n"
+
+	else:
+		return line;
+
+fileProcess( "CMakeLists.txt", cmakeRule2 )