Skip to content

Commit ce94328

Browse files
pks-tgitster
authored andcommitted
meson: inline the static 'git' library
When setting up `libgit.a` we first create the static library itself, and then declare it as part of a dependency such that compile arguments, include directories and transitive dependencies get propagated to the users of that library. As such, the static library isn't expected to be used by anything but the declared dependency. Inline the static library so that we don't even use a separate variable for it. This avoids any kind of confusion that may arise and clarifies how the library is supposed to be used. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6128301 commit ce94328

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

meson.build

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,17 +1555,15 @@ libgit_version_library = static_library('git-version',
15551555
include_directories: libgit_include_directories,
15561556
)
15571557

1558-
libgit_library = static_library('git',
1559-
sources: libgit_sources,
1560-
c_args: libgit_c_args,
1561-
link_with: libgit_version_library,
1562-
dependencies: libgit_dependencies,
1563-
include_directories: libgit_include_directories,
1564-
)
1565-
15661558
libgit = declare_dependency(
1559+
link_with: static_library('git',
1560+
sources: libgit_sources,
1561+
c_args: libgit_c_args,
1562+
link_with: libgit_version_library,
1563+
dependencies: libgit_dependencies,
1564+
include_directories: libgit_include_directories,
1565+
),
15671566
compile_args: libgit_c_args,
1568-
link_with: libgit_library,
15691567
dependencies: libgit_dependencies,
15701568
include_directories: libgit_include_directories,
15711569
)

0 commit comments

Comments
 (0)