-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: simplify build process (#732)
* build: bls doesn't need python bindings nor tests * build: build inprovements * chore: build improvements * doc: installation update * chore: remove CMAKE_INSTALL_PREFIX * chore: fix CMAKE INSTALL * chore: fix destdir
- Loading branch information
Showing
7 changed files
with
75 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,41 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
SCRIPT_PATH="$(realpath "$(dirname "$0")")" | ||
|
||
SRC_PATH="${SCRIPT_PATH}/src" | ||
BUILD_PATH="${SCRIPT_PATH}/build" | ||
BLS_SM_PATH="third_party/bls-signatures/src" | ||
BLS_SM_PATH="${SRC_PATH}" | ||
BLS_GIT_REPO="https://github.com/dashpay/bls-signatures.git" | ||
BLS_GIT_BRANCH=${BLS_GIT_BRANCH:-"1.2.6"} | ||
|
||
set -e | ||
|
||
if ! git submodule update --init "${BLS_SM_PATH}" ; then | ||
pushd "${SCRIPT_PATH}" | ||
|
||
if ! git submodule update --init "${BLS_SM_PATH}"; then | ||
echo "It looks like this source code is not tracked by git." | ||
echo "As a fallback scenario we will fetch \"${BLS_GIT_BRANCH}\" branch \"${BLS_GIT_REPO}\" library." | ||
echo "We would recommend to clone of this project rather than using a release archive." | ||
rm -r "${BLS_SM_PATH}" || true | ||
rm -r "${BLS_SM_PATH}" || true | ||
git clone --single-branch --branch "${BLS_GIT_BRANCH}" "${BLS_GIT_REPO}" "${BLS_SM_PATH}" | ||
fi | ||
|
||
# Create folders for source and build data | ||
mkdir -p "${BUILD_PATH}" | ||
|
||
# Configurate the library build | ||
cmake -B "${BUILD_PATH}" -S "${SRC_PATH}" | ||
cmake \ | ||
-D BUILD_BLS_PYTHON_BINDINGS=OFF \ | ||
-D BUILD_BLS_TESTS=OFF \ | ||
-D BUILD_BLS_BENCHMARKS=OFF \ | ||
-B "${BUILD_PATH}" -S "${SRC_PATH}" | ||
|
||
# Build the library | ||
cmake --build "${BUILD_PATH}" -- -j 6 | ||
|
||
mkdir -p "${BUILD_PATH}/src/bls-dash" | ||
cp -r ${SRC_PATH}/src/* "${BUILD_PATH}/src/bls-dash" | ||
|
||
popd | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters