Skip to content

Commit

Permalink
Improve build summary for internal dependencies
Browse files Browse the repository at this point in the history
Specifically for those created with `declare_dependency()`, which do
not have a version number or name.
  • Loading branch information
kleisauke committed May 26, 2024
1 parent d4f7c74 commit 5d9f4be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ build_features = {
# which will make summary fail
seen_deps = []
foreach dep: external_deps + module_deps
if dep.name() not in seen_deps
if dep.type_name() != 'internal' and dep.name() not in seen_deps
summary(dep.name(), dep.version(), section: 'Dependencies')
seen_deps += dep.name()
endif
Expand All @@ -782,8 +782,11 @@ foreach section_title, section : build_summary
endforeach
foreach section_title, section: build_features
foreach key, arr : section
dep_name = arr[0]
found = arr[1].found()
dep_name = found ? arr[1].name() : arr[0]
if found and arr[1].type_name() != 'internal'
dep_name = arr[1].name()
endif
dynamic_module = arr.length() > 2 ? [' (dynamic module: ', arr[2], ')'] : []
summary('@0@ with @1@'.format(key, dep_name), [found] + dynamic_module, bool_yn: true, list_sep: '', section: section_title)
endforeach
Expand Down

0 comments on commit 5d9f4be

Please sign in to comment.