2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[#3065] get gtest ver with pkg-config

This commit is contained in:
Piotrek Zadroga
2023-09-26 12:13:20 +02:00
parent 870ab86e4a
commit dddadcb93a

View File

@@ -169,6 +169,12 @@ if test "x$enable_gtest" = "xyes" ; then
GTEST_LDFLAGS="-L$dir/lib" GTEST_LDFLAGS="-L$dir/lib"
GTEST_LDADD="-lgtest" GTEST_LDADD="-lgtest"
GTEST_FOUND="true" GTEST_FOUND="true"
if test -f "$dir/lib/pkgconfig/gtest.pc" ; then
pkg-config --modversion "$dir/lib/pkgconfig/gtest.pc" &> /dev/null
if test $? -eq 0; then
GTEST_VERSION="$(pkg-config --modversion "$dir/lib/pkgconfig/gtest.pc")"
fi
fi
break break
else else
AC_MSG_WARN([Found Google Test include but not the library in $dir.]) AC_MSG_WARN([Found Google Test include but not the library in $dir.])