Skip to content

Commit

Permalink
use system gtest if available
Browse files Browse the repository at this point in the history
Package maintainers won't need to patch Aegisub to use the system
version. This also helps Aegisub compile on platforms where the
unmodified gtest source doesn't compile but a package is available, such
as OpenBSD.

I've tested the conditional branch where gtest is present in the system
on OpenBSD. I can't properly test the branch where it isn't present
because the subproject doesn't compile on OpenBSD, but I've checked that
it tries to compile the subproject.
  • Loading branch information
guijan authored and arch1t3cht committed Dec 19, 2024
1 parent 99af221 commit f1c36c9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
gtest_proj = subproject('gtest')
gtest_dep = gtest_proj.get_variable('gtest_dep')
gmock_dep = gtest_proj.get_variable('gmock_dep')
gtest_ver = '>=1.14.0'
gtest_dep = dependency('gtest',
fallback : ['gtest', 'gtest_dep'],
version : gtest_ver)
gmock_dep = dependency('gmock',
fallback : ['gtest', 'gmock_dep'],
version : gtest_ver)

tests_deps = [
gtest_dep,
Expand Down

0 comments on commit f1c36c9

Please sign in to comment.