summaryrefslogtreecommitdiff
path: root/contrib/buildsystems/Generators/Vcproj.pm
diff options
context:
space:
mode:
authorLibravatar Sebastian Schuberth <sschuberth@gmail.com>2009-09-28 13:34:21 +0200
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2009-09-29 08:54:37 -0700
commite0ab002b5093e87f06871d7e25ac03e26841d355 (patch)
treed805b1fe1d926bdd9f6b6653831dc97d795f318a /contrib/buildsystems/Generators/Vcproj.pm
parentMake generated MSVC solution file open from Windows Explorer (diff)
downloadtgif-e0ab002b5093e87f06871d7e25ac03e26841d355.tar.xz
Make just opening the generated MSVC solution file not modify it
The format of the generated MSVC solution file is fixed in a way that just opening it in Visual Studio and immediately closing it again without performing any modifications does not trigger a prompt to save the solution file. This behavior was caused by several minor incompatibilities between the generated file and what Visual Studio 2008 expected, so Visual Studio transparently fixed the file format, marking it internally as modified. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Acked-by: Marius Storm-Olsen <mstormo@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'contrib/buildsystems/Generators/Vcproj.pm')
-rw-r--r--contrib/buildsystems/Generators/Vcproj.pm42
1 files changed, 11 insertions, 31 deletions
diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm
index 37f72e53ac..be94ba18d2 100644
--- a/contrib/buildsystems/Generators/Vcproj.pm
+++ b/contrib/buildsystems/Generators/Vcproj.pm
@@ -571,45 +571,29 @@ sub createGlueProject {
print F "\"${libname}\", \"${libname}\\${libname}.vcproj\", \"${uuid}\"";
print F "$SLN_POST";
}
+ my $uuid_libgit = $build_structure{"LIBS_libgit_GUID"};
+ my $uuid_xdiff_lib = $build_structure{"LIBS_xdiff_lib_GUID"};
foreach (@apps) {
my $appname = $_;
my $uuid = $build_structure{"APPS_${appname}_GUID"};
print F "$SLN_PRE";
- print F "\"${appname}\", \"${appname}\\${appname}.vcproj\", \"${uuid}\"";
+ print F "\"${appname}\", \"${appname}\\${appname}.vcproj\", \"${uuid}\"\n";
+ print F " ProjectSection(ProjectDependencies) = postProject\n";
+ print F " ${uuid_libgit} = ${uuid_libgit}\n";
+ print F " ${uuid_xdiff_lib} = ${uuid_xdiff_lib}\n";
+ print F " EndProjectSection";
print F "$SLN_POST";
}
print F << "EOM";
Global
- GlobalSection(SolutionConfiguration) = preSolution
- ConfigName.0 = Debug|Win32
- ConfigName.1 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
EndGlobalSection
- GlobalSection(ProjectDependencies) = postSolution
EOM
- foreach (@{$build_structure{"APPS"}}) {
- my $appname = $_;
- my $appname_clean = $_;
- $appname_clean =~ s/\//_/g;
- $appname_clean =~ s/\.exe//;
-
- my $uuid = $build_structure{"APPS_${appname_clean}_GUID"};
- my $dep_index = 0;
- foreach(@{$build_structure{"APPS_${appname}_LIBS"}}) {
- my $libname = $_;
- $libname =~ s/\//_/g;
- $libname =~ s/\.(a|lib)//;
- my $libuuid = $build_structure{"LIBS_${libname}_GUID"};
- if (defined $libuuid) {
- print F "\t\t${uuid}.${dep_index} = ${libuuid}\n";
- $dep_index += 1;
- }
- }
- }
-
print F << "EOM";
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
EOM
foreach (@libs) {
my $libname = $_;
@@ -630,10 +614,6 @@ EOM
print F << "EOM";
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
EndGlobal
EOM
close F;