| 620 | return (ur, result) |
| 621 | |
| 622 | def extra_usage_requirements (self, created_targets, prop_set): |
| 623 | |
| 624 | result = property_set.empty () |
| 625 | extra = [] |
| 626 | |
| 627 | # Add appropriate <xdll-path> usage requirements. |
| 628 | raw = prop_set.raw () |
| 629 | if '<link>shared' in raw: |
| 630 | paths = [] |
| 631 | |
| 632 | # TODO: is it safe to use the current directory? I think we should use |
| 633 | # another mechanism to allow this to be run from anywhere. |
| 634 | pwd = os.getcwd() |
| 635 | |
| 636 | for t in created_targets: |
| 637 | if type.is_derived(t.type(), 'SHARED_LIB'): |
| 638 | paths.append(path.root(path.make(t.path()), pwd)) |
| 639 | |
| 640 | extra += replace_grist(paths, '<xdll-path>') |
| 641 | |
| 642 | # We need to pass <xdll-path> features that we've got from sources, |
| 643 | # because if shared library is built, exe which uses it must know paths |
| 644 | # to other shared libraries this one depends on, to be able to find them |
| 645 | # all at runtime. |
| 646 | |
| 647 | # Just pass all features in property_set, it's theorically possible |
| 648 | # that we'll propagate <xdll-path> features explicitly specified by |
| 649 | # the user, but then the user's to blaim for using internal feature. |
| 650 | values = prop_set.get('<xdll-path>') |
| 651 | extra += replace_grist(values, '<xdll-path>') |
| 652 | |
| 653 | if extra: |
| 654 | result = property_set.create(extra) |
| 655 | |
| 656 | return result |
| 657 | |
| 658 | def generated_targets (self, sources, prop_set, project, name): |
| 659 | |