Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
cmake: clean build
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Feb 14, 2020
1 parent 9216da1 commit dd95c55
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions extra/cmake/build
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh -e

# Use cmake to build cmake if installed.
# This leads to a much faster build.
if kiss l cmake; then
export DESTDIR=$1

cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
Expand All @@ -15,24 +15,19 @@ if kiss l cmake; then
-DBUILD_TESTING=OFF

cmake --build build
DESTDIR="$1" cmake --install build
cmake --install build

else
./configure \
--prefix=/usr \
--system-curl \
--system-expat \
--system-zlib \
--system-bzip2 \
--parallel="$(nproc)"
--system-bzip2

make
make DESTDIR="$1" install
fi

# Grab the package version.
IFS=. read -r ver1 ver2 _ < "${0%/*}/version"

# Remove docs.
rm -rf "$1/usr/doc"
rm -rf "$1/usr/share/cmake-$ver1.$ver2/Help"
rm -rf "$1/usr/share/cmake"-?.?/Help

0 comments on commit dd95c55

Please sign in to comment.