From e4163c3201c094e267689ce85c7b7ff3afa61818 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 28 May 2004 08:46:49 +0000 Subject: [PATCH] Properly hardcode dll paths, even if library was not produced by 'lib' target, but was specified as file. [SVN r22963] --- v2/tools/builtin.jam | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index 1401948df..5ca411fd7 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -606,6 +606,9 @@ IMPORT $(__name__) : register-c-compiler : : generators.register-c-compiler ; class linking-generator : generator { import property-set ; + import type ; + import path ; + import project ; rule __init__ ( id composing ? : # Specify if generator is composing. The generator will be @@ -625,10 +628,27 @@ class linking-generator : generator if [ $(property-set).get ] = true { local xdll-path = [ $(property-set).get ] ; + # It's possible that we have libraries in sources which did not came + # from 'lib' target. For example, libraries which are specified + # just as filenames as sources. We don't have xdll-path properties + # for such target, but still need to add proper dll-path properties. + for local s in $(sources) + { + if [ type.is-derived [ $(s).type ] SHARED_LIB ] && ! [ $(s).action ] + { + # Unfortunately, we don't have a good way to find the path + # to a file, so use this nasty approach. + local location = [ path.root [ $(s).name ] + [ project.attribute [ $(s).project ] source-location ] ] ; + xdll-path += [ path.parent $(location) ] ; + } + } + if $(xdll-path) { property-set = [ $(property-set).add-raw $(xdll-path:G=) ] ; } + } local result = [ generator.run $(project) $(name) : $(property-set)