diff options
| author | Carlos MartÃn Nieto <[email protected]> | 2019-01-07 14:02:51 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-01-07 14:02:51 +0000 |
| commit | b30b050c9c8a531c9c58b8b52c83a13b8d149caf (patch) | |
| tree | a66d410cc0b3a5a00d85a7b70a53afa601473cab /script/build-libgit2-static.sh | |
| parent | e93f34cf186c46cd105b0f58ac2a390cc87fb698 (diff) | |
| parent | f3c487966d53ad78e25d2e6750414009f5606dbb (diff) | |
Merge pull request #475 from lhchavez/self-contained-build
Improve the static build script
Diffstat (limited to 'script/build-libgit2-static.sh')
| -rwxr-xr-x | script/build-libgit2-static.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/script/build-libgit2-static.sh b/script/build-libgit2-static.sh index 1568ece..680dd93 100755 --- a/script/build-libgit2-static.sh +++ b/script/build-libgit2-static.sh @@ -2,18 +2,19 @@ set -ex -VENDORED_PATH=vendor/libgit2 +ROOT="$(cd "$0/../.." && echo "${PWD}")" +BUILD_PATH="${ROOT}/static-build" +VENDORED_PATH="${ROOT}/vendor/libgit2" -cd $VENDORED_PATH && -mkdir -p install/lib && -mkdir -p build && -cd build && +mkdir -p "${BUILD_PATH}/build" "${BUILD_PATH}/install/lib" + +cd "${BUILD_PATH}/build" && cmake -DTHREADSAFE=ON \ -DBUILD_CLAR=OFF \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_C_FLAGS=-fPIC \ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ - -DCMAKE_INSTALL_PREFIX=../install \ - .. && + -DCMAKE_INSTALL_PREFIX="${BUILD_PATH}/install" \ + "${VENDORED_PATH}" && cmake --build . --target install |
