set GIT_VERSION only where it is used (nw)

This commit is contained in:
Miodrag Milanovic 2016-04-21 15:44:46 +02:00
parent f5aa86dfc6
commit 0d980951c9
2 changed files with 11 additions and 12 deletions

View File

@ -520,17 +520,6 @@ if (_OPTIONS["SOURCES"] == nil) then
dofile (path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))
end
if _OPTIONS["IGNORE_GIT"]~="1" then
GIT_VERSION = backtick( "git describe" )
local p = string.find(GIT_VERSION, '-', 1)
if (p~=nil) then
defines {
"GIT_VERSION=" .. string.sub(GIT_VERSION,p+1)
}
end
end
configuration { "gmake" }
flags {
"SingleOutputDir",

View File

@ -136,7 +136,17 @@ end
end
configuration { }
if _OPTIONS["IGNORE_GIT"]~="1" then
GIT_VERSION = backtick( "git describe --dirty" )
local p = string.find(GIT_VERSION, '-', 1)
if (p~=nil) then
defines {
"GIT_VERSION=" .. string.sub(GIT_VERSION,p+1)
}
end
end
if _OPTIONS["targetos"]=="android" then
includedirs {
MAME_DIR .. "3rdparty/SDL2/include",