development/gtest: Rework libraries installation.

Copy also missing cmake files

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2024-05-07 17:40:25 +02:00 committed by Willy Sudiarto Raharjo
parent a99270b8b8
commit 29e11f50c6
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -34,7 +34,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gtest
SRCNAM=googletest
VERSION=${VERSION:-1.12.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -111,13 +111,20 @@ install -m 0644 googletest/include/$PRGNAM/internal/custom/*.h \
$PKG/usr/include/$PRGNAM/internal/custom
# install the libs and the pkgconfig files!
install -s -m 0755 build/lib/*.so $PKG/usr/lib$LIBDIRSUFFIX
for i in build/lib/*.so ; do
install -s -m 0755 $i $PKG/usr/lib$LIBDIRSUFFIX/$(basename $i .so).so.$VERSION
ln -s $(basename $i .so).so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/$(basename $i .so).so
done
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig
for i in gmock gmock_main gtest gtest_main ; do
sed "s| -lpthread||g" build/googletest/generated/${i}.pc \
> $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig/${i}.pc
done
# copy the cmake filesa
cp -a build/googletest/CMakeFiles/Export/lib$LIBDIRSUFFIX/cmake $PKG/usr/lib$LIBDIRSUFFIX/
install -m 0644 build/googletest/generated/*.cmake $PKG/usr/lib$LIBDIRSUFFIX/cmake/GTest
mkdir -p $PKG/usr/src
cp -R googlemock $PKG/usr/src
cp -R googletest $PKG/usr/src