Add meson build system
Meson is a build system somewhat like cmake, but without all of the rough edges. It supports many OSes, including all of the major ones, and a large number of C++ compilers. My interest isn't really in convincing people to use meson as the default here, but meson provides a subproject mechanism that can fetch external projects and build them along with the main project in a single configure/compile invocation. This is extremely useful for platforms that lack a (competent) package manager. As far as I know the meson build does everything the cmake build does, with one exception: generate the cmake config/version files. meson can generate these files, but only in simple cases, and not when using export targets like tinyxml2 does.
This commit is contained in:
@@ -134,6 +134,15 @@ def cmakeRule2( line ):
|
||||
|
||||
fileProcess( "CMakeLists.txt", cmakeRule2 )
|
||||
|
||||
def mesonRule(line):
|
||||
match = re.search(r"(\s*version) : '(\d+.\d+.\d+)',", line)
|
||||
if match:
|
||||
print("1)meson.build version found.")
|
||||
return "{} : '{}.{}.{}',\n".format(match.group(1), major, minor, build)
|
||||
return line
|
||||
|
||||
fileProcess("meson.build", mesonRule)
|
||||
|
||||
print( "Release note:" )
|
||||
print( '1. Build. g++ -Wall -DTINYXML2_DEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe' )
|
||||
print( '2. Commit. git commit -am"setting the version to ' + versionStr + '"' )
|
||||
|
||||
Reference in New Issue
Block a user