vcpkg/ports/botan/fix-objectfile-list.patch

24 lines
932 B
Diff
Raw Normal View History

diff --git a/configure.py b/configure.py
index 2474860a5..7d320d470 100755
--- a/configure.py
+++ b/configure.py
@@ -1821,13 +1821,12 @@ def yield_objectfile_list(sources, obj_dir, obj_suffix, options):
for src in sources:
(directory, filename) = os.path.split(os.path.normpath(src))
- parts = directory.split(os.sep)
+ parts_in_src = directory.split(os.sep + 'src' + os.sep)
+ parts = []
- if 'src' in parts:
- parts = parts[parts.index('src')+2:]
- elif options.amalgamation and filename.find(options.name_amalgamation) != -1:
- parts = []
- else:
+ if len(parts_in_src) > 1:
+ parts = [ 'src' ] + parts_in_src[-1].split(os.sep)
+ elif not options.amalgamation or filename.find(options.name_amalgamation) == -1:
raise InternalError("Unexpected file '%s/%s'" % (directory, filename))
if parts != []: