From d181c34e7aa294c5352866cadd977f092ae347ea Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 20 Oct 2005 21:55:55 +0000 Subject: [PATCH] fixed creation of *.vcproj files for object libraries started implementing code which adds dependencies to *.sln file fixed some warnings in cmd when compiling with msvc 2005 svn path=/trunk/; revision=18646 --- reactos/subsys/system/cmd/precomp.h | 1 + reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/system/cmd/precomp.h b/reactos/subsys/system/cmd/precomp.h index 5aa02334d69..873256ba868 100644 --- a/reactos/subsys/system/cmd/precomp.h +++ b/reactos/subsys/system/cmd/precomp.h @@ -1,5 +1,6 @@ #ifdef _MSC_VER #pragma warning ( disable : 4103 ) /* use #pragma pack to change alignment */ +#define _CRT_SECURE_NO_DEPRECATE #endif//_MSC_VER #include diff --git a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp index 7bba279affe..33fbb98cc67 100644 --- a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp +++ b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp @@ -53,7 +53,7 @@ MSVCBackend::_generate_vcproj ( const Module& module ) } string module_type = GetExtension(module.GetTargetName()); - bool lib = (module_type == ".lib") || (module_type == ".a"); + bool lib = (module.type == ObjectLibrary) || (module_type == ".lib") || (module_type == ".a"); bool dll = (module_type == ".dll") || (module_type == ".cpl"); bool exe = (module_type == ".exe"); // TODO FIXME - need more checks here for 'sys' and possibly 'drv'? @@ -448,8 +448,13 @@ MSVCBackend::_generate_sln_project ( //FIXME: only omit ProjectDependencies in VS 2005 when there are no dependencies //NOTE: VS 2002 do not use ProjectSection; it uses GlobalSection instead - if (configuration.VSProjectVersion == "7.10") { + if ((configuration.VSProjectVersion == "7.10") || (dependencies.size() > 0)) { fprintf ( OUT, "\tProjectSection(ProjectDependencies) = postProject\r\n" ); + for ( size_t i = 0; i < dependencies.size(); i++ ) + { + Dependency& dependency = *dependencies[i]; + fprintf ( OUT, "\t\t%s = %s\r\n", dependency.module.guid.c_str(), dependency.module.guid.c_str() ); + } fprintf ( OUT, "\tEndProjectSection\r\n" ); } @@ -477,10 +482,10 @@ MSVCBackend::_generate_sln_footer ( FILE* OUT ) fprintf ( OUT, "\tEndGlobalSection\r\n" ); fprintf ( OUT, "\tGlobalSection(ExtensibilityAddIns) = postSolution\r\n" ); fprintf ( OUT, "\tEndGlobalSection\r\n" ); - if (configuration.VSProjectVersion == "7.00") { fprintf ( OUT, "\tGlobalSection(ProjectDependencies) = postSolution\r\n" ); + //FIXME: Add dependencies for VS 2002 fprintf ( OUT, "\tEndGlobalSection\r\n" ); }