From 8f965b75c66f4ea6eafaa09f0d4b8949305fcbb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 2 Sep 2007 13:08:00 +0000 Subject: [PATCH] Search a property by its name svn path=/trunk/; revision=28770 --- reactos/tools/rbuild/backend/mingw/modulehandler.cpp | 12 ++++++++++++ reactos/tools/rbuild/backend/mingw/modulehandler.h | 1 + 2 files changed, 13 insertions(+) diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp index 296e4f5a3bd..45db6e03a8e 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp @@ -1203,6 +1203,18 @@ MingwModuleHandler::GetWidlFlags ( const CompilationUnit& compilationUnit ) return compilationUnit.GetSwitches (); } +string +MingwModuleHandler::GetPropertyValue ( const Module& module, const std::string& name ) +{ + for ( size_t i = 0; i < module.project.non_if_data.properties.size (); i++ ) + { + const Property& property = *module.project.non_if_data.properties[i]; + if ( property.name == name ) + return property.value; + } + return string ( "" ); +} + string MingwModuleHandler::GetRpcServerHeaderFilename ( string basename ) const { diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h index 44ac9b2b6d8..804c4e26ad4 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.h +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h @@ -211,6 +211,7 @@ private: void GenerateBuildNonSymbolStrippedCode (); void CleanupCompilationUnitVector ( std::vector& compilationUnits ); void GetRpcHeaderDependencies ( std::vector& dependencies ) const; + static std::string GetPropertyValue ( const Module& module, const std::string& name ); std::string GetRpcServerHeaderFilename ( std::string basename ) const; std::string GetRpcClientHeaderFilename ( std::string basename ) const; std::string GetIdlHeaderFilename ( std::string basename ) const;