2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-11-15 19:20:10 -07:00

cmake: build with cmake if available

This commit is contained in:
Dylan Araps 2019-11-17 01:19:20 +00:00
parent 969bd3897e
commit 3a36ae23fb
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

View File

@ -1,10 +1,24 @@
#!/bin/sh -e
./configure \
--prefix=/usr
# Use cmake to build cmake if installed.
# This leads to a much faster build.
if kiss l cmake; then
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=Release
make
make DESTDIR="$1" install
cmake --build build
DESTDIR="$1" cmake --install build
else
./configure \
--prefix=/usr
make
make DESTDIR="$1" install
fi
# Grab the package version.
IFS=. read -r ver1 ver2 _ < "${0%/*}/version"