Enable version.ps1 on windows

version.ps1 itself still has to be modified to support out-of-tree builds
This commit is contained in:
Ryan Lucia 2019-01-28 16:43:36 -05:00
parent c564df55aa
commit 02a2c12cee
2 changed files with 7 additions and 2 deletions

View file

@ -1,4 +1,8 @@
version_sh = find_program('./version.sh') if host_machine.system() == 'windows'
version_sh = find_program('.\\version.ps1')
else
version_sh = find_program('./version.sh')
endif
version_inc = include_directories('.') version_inc = include_directories('.')
version_h = custom_target('git_version.h', version_h = custom_target('git_version.h',
command : [version_sh, meson.source_root()], command : [version_sh, meson.source_root()],

View file

@ -1,3 +1,4 @@
#!/usr/bin/env powershell
$lastSvnRevision = 6962 $lastSvnRevision = 6962
$lastSvnHash = '16cd907fe7482cb54a7374cd28b8501f138116be' $lastSvnHash = '16cd907fe7482cb54a7374cd28b8501f138116be'
$defineNumberMatch = [regex] '^#define\s+(\w+)\s+(\d+)$' $defineNumberMatch = [regex] '^#define\s+(\w+)\s+(\d+)$'
@ -86,4 +87,4 @@ $gitVersionXml = [xml]@'
$gitVersionXml.Project.PropertyGroup.GitVersionNumber = $gitRevision.ToString() $gitVersionXml.Project.PropertyGroup.GitVersionNumber = $gitRevision.ToString()
$gitVersionXml.Project.PropertyGroup.GitVersionString = $gitVersionString $gitVersionXml.Project.PropertyGroup.GitVersionString = $gitVersionString
$gitVersionXml.Save($gitVersionXmlPath) $gitVersionXml.Save($gitVersionXmlPath)