mirror of
https://github.com/status-im/nim-rocksdb.git
synced 2026-08-27 18:01:08 +00:00
- We now only support static linking on Linux and MacOS. Windows is still only using dynamic linking. - Dynamically linking can be enabled on Linux and MacOS using the 'rocksdb_dynamic_linking' flag but this is not documented and the dynamic libraries are not built in nimble install. They can be built using one of the build scripts if needed. - Updated the wrapper generation so that we don't need to use dynlibOverride when using static linking. - Static libs are copied to the same directory as the dll. - Cleaned up the librocksdb.nim file which imports the rocksdb wrapper. - Updated the tasks in the nimble file.
28 lines
903 B
Bash
Executable File
28 lines
903 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Nim-RocksDB
|
|
# Copyright 2024-2025 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
#
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
|
# * GPL license, version 2.0, ([LICENSE-GPLv2](LICENSE-GPLv2) or https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
|
|
#
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"/..
|
|
|
|
REPO_DIR="${PWD}"
|
|
BUILD_DEST="${REPO_DIR}/build/"
|
|
|
|
git submodule update --init
|
|
|
|
${REPO_DIR}/vendor/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
|
|
|
${REPO_DIR}/vendor/vcpkg/vcpkg install rocksdb[lz4,zstd]:x64-linux-rocksdb --recurse --overlay-triplets=${REPO_DIR}/triplets
|
|
|
|
mkdir -p "${BUILD_DEST}"
|
|
|
|
cp "${REPO_DIR}/vendor/vcpkg/installed/x64-linux-rocksdb/lib/librocksdb.so" "${BUILD_DEST}/"
|