Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding pre-build event, tweaking git_version.sh, updating .gitignore.
  • Loading branch information
MainMemory committed Jul 9, 2015
1 parent 6bd9843 commit 2992883
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Expand Up @@ -60,10 +60,4 @@ ipch/
*.vsp
*.vspx

# CMake build directory
/build/
/build.release/
/build.debug/

# MSVC project directory
/vsproj/
SADXModLoader/git_version.h
6 changes: 6 additions & 0 deletions SADXModLoader/SADXModLoader.vcxproj
Expand Up @@ -100,6 +100,9 @@
<AdditionalDependencies>d3dx8.lib;bass.lib;bass_vgmstream.lib;..\$(Configuration)\libmodutils.lib;shlwapi.lib;dbghelp.lib;gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>libci.lib</IgnoreSpecificDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>..\git_version.sh &gt;git_version.h</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
Expand All @@ -122,6 +125,9 @@
<IgnoreSpecificDefaultLibraries>libci.lib</IgnoreSpecificDefaultLibraries>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PreBuildEvent>
<Command>..\git_version.sh &gt;git_version.h</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
5 changes: 1 addition & 4 deletions git_version.sh
Expand Up @@ -174,10 +174,7 @@ fi
git_repo=no
# "git-rev-parse --git-dir" since git-0.99.7
git_repo_dir="$($GIT rev-parse --git-dir 2> /dev/null || true)"
abs_repo_dir="$(cd "$git_repo_dir" && pwd)"
# Only accept the found git repo iff it is in our top srcdir, as determined
# by comparing absolute pathnames created by running pwd in the respective dir.
if [ "x$git_repo_dir" != "x" ] && [ "x${abs_repo_dir}" = "x${abs_srcdir}/.git" ]; then
if [ "x$git_repo_dir" != "x" ]; then
git_repo=yes
if [ "x$git_found" = "xyes" ]; then
# git-1.4 and probably earlier understand "git-rev-parse HEAD"
Expand Down

0 comments on commit 2992883

Please sign in to comment.