Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: pylib/gyp/generator/msvs.py

Issue 10749020: Adds support for the library_dirs key, which appears in the documentation but was never actually im… (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pylib/gyp/generator/msvs.py
===================================================================
--- pylib/gyp/generator/msvs.py (revision 1429)
+++ pylib/gyp/generator/msvs.py (working copy)
@@ -1077,7 +1077,7 @@
"""Returns the list of directories to be used for #include directives.
Arguments:
- config: The dictionnary that defines the special processing to be done
+ config: The dictionary that defines the special processing to be done
for this configuration.
Returns:
The list of directory paths.
@@ -1093,6 +1093,20 @@
return include_dirs, resource_include_dirs
+def _GetLibraryDirs(config):
+ """Returns the list of directories to be used for library search paths.
+
+ Arguments:
+ config: The dictionary that defines the special processing to be done
+ for this configuration.
+ Returns:
+ The list of directory paths.
+ """
+ library_dirs = config.get('library_dirs', [])
+ library_dirs = _FixPaths(library_dirs)
+ return library_dirs
+
+
def _GetLibraries(spec):
"""Returns the list of libraries for this configuration.
@@ -2738,6 +2752,7 @@
msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(msvs_settings)
include_dirs, resource_include_dirs = _GetIncludeDirs(configuration)
libraries = _GetLibraries(spec)
+ library_dirs = _GetLibraryDirs(configuration)
out_file, _, msbuild_tool = _GetOutputFilePathAndTool(spec)
defines = _GetDefines(configuration)
if converted:
@@ -2769,6 +2784,8 @@
'AdditionalIncludeDirectories', resource_include_dirs)
# Add in libraries.
_ToolAppend(msbuild_settings, 'Link', 'AdditionalDependencies', libraries)
+ _ToolAppend(msbuild_settings, 'Link', 'AdditionalLibraryDirectories',
+ library_dirs)
if out_file:
_ToolAppend(msbuild_settings, msbuild_tool, 'OutputFile', out_file,
only_if_unset=True)

Powered by Google App Engine
This is Rietveld 408576698