mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
meson: create git_version.h in build directory in version.sh
This commit is contained in:
parent
0c5c4db142
commit
fd00ba50f2
@ -13,7 +13,7 @@ else
|
||||
endif
|
||||
version_inc = include_directories('.')
|
||||
version_h = custom_target('git_version.h',
|
||||
command: [version_sh, meson.current_build_dir()],
|
||||
command: [version_sh, meson.current_build_dir(), meson.current_source_dir()],
|
||||
build_by_default: true,
|
||||
build_always_stale: true, # has internal check whether target file will be refreshed
|
||||
output: ['git_version.h', 'git_version.xml'])
|
||||
|
@ -1,7 +1,8 @@
|
||||
srcdir="$1"
|
||||
builddir="$1"
|
||||
srcdir="$2"
|
||||
|
||||
# If no git repo try to read from the existing git_version.h, for building from tarballs
|
||||
version_h_path="${srcdir}/git_version.h"
|
||||
version_h_path="${builddir}/git_version.h"
|
||||
if ! test -d "${srcdir}/.git"; then
|
||||
if test -f "${version_h_path}"; then
|
||||
while read line; do
|
||||
@ -65,7 +66,7 @@ export BUILD_GIT_VERSION_NUMBER="${git_revision}"
|
||||
export BUILD_GIT_VERSION_STRING="${git_version_str}"
|
||||
export VERSION_SOURCE="from git"
|
||||
|
||||
cat << EOF > "${srcdir}/git_version.xml"
|
||||
cat << EOF > "${builddir}/git_version.xml"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user