make_msvcX_install_[config] patch by Brezenbak
[reactos.git] / reactos / tools / rbuild / backend / msvc / vcprojmaker.cpp
index 4d84fdf..3140229 100644 (file)
@@ -145,11 +145,10 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                        // this code is deactivated untill the tree builds fine with msvc\r
                        // --- is appended to each library path which is later\r
                        // replaced by the configuration\r
-                       // i.e. ../output-i386/lib/rtl/---/rtl.lib becomes\r
-                       //      ../output-i386/lib/rtl/Debug/rtl.lib \r
+                       // i.e. ../output-i386/lib/rtl/vcXX/---/rtl.lib becomes\r
+                       //      ../output-i386/lib/rtl/vcXX/Debug/rtl.lib \r
                        // etc\r
-                       libs[i]->importedModule->\r
-                       string libpath = outdir + "\\" + libs[i]->importedModule->GetBasePath() + "\\---\\" + libs[i]->name + ".lib";\r
+                       string libpath = outdir + "\\" + libs[i]->importedModule->GetBasePath() + "\\" + _get_vc_dir() + "\\---\\" + libs[i]->name + ".lib";\r
                        libraries.push_back ( libpath );\r
 #else\r
                libraries.push_back ( libs[i]->name + ".lib" );\r
@@ -252,8 +251,8 @@ MSVCBackend::_generate_vcproj ( const Module& module )
 \r
                fprintf ( OUT, "\t\t<Configuration\r\n" );\r
                fprintf ( OUT, "\t\t\tName=\"%s|Win32\"\r\n", cfg.c_str() );\r
-               fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s\\%s\"\r\n", outdir.c_str (), module.GetBasePath ().c_str (), cfg.c_str() );\r
-               fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s\\%s\"\r\n", intdir.c_str (), module.GetBasePath ().c_str (), cfg.c_str() );\r
+               fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s\\%s\\%s\"\r\n", outdir.c_str (), module.GetBasePath ().c_str (), _get_vc_dir().c_str (), cfg.c_str() );\r
+               fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s\\%s\\%s\"\r\n", intdir.c_str (), module.GetBasePath ().c_str (), _get_vc_dir().c_str (), cfg.c_str() );\r
                fprintf ( OUT, "\t\t\tConfigurationType=\"%d\"\r\n", exe ? 1 : dll ? 2 : lib ? 4 : -1 );\r
                fprintf ( OUT, "\t\t\tCharacterSet=\"2\">\r\n" );\r
 \r
@@ -321,6 +320,9 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                        string pch_path = Path::RelativeFromDirectory (\r
                                module.pch->file.name,\r
                                module.GetBasePath() );\r
+                       string::size_type pos = pch_path.find_last_of ("/");\r
+                       if ( pos != string::npos )\r
+                               pch_path.erase(0, pos+1);         \r
                        fprintf ( OUT, "\t\t\t\tPrecompiledHeaderThrough=\"%s\"\r\n", pch_path.c_str() );\r
                }\r
                else\r