Skip to content

Commit

Permalink
Build windows and macos shared libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhartnett committed Dec 12, 2024
1 parent 073b5d9 commit fea0a2d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
3 changes: 3 additions & 0 deletions scripts/build_dlls_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ CALL .\vendor\vcpkg\bootstrap-vcpkg.bat -disableMetrics
.\vendor\vcpkg\vcpkg install rocksdb[lz4,zstd]:x64-windows-rocksdb --recurse --overlay-triplets=.\triplets

mkdir .\build

copy .\vendor\vcpkg\installed\x64-windows-rocksdb\bin\lz4-shared.dll .\build\liblz4.dll
copy .\vendor\vcpkg\installed\x64-windows-rocksdb\bin\zstd-shared.dll .\build\libzstd.dll
copy .\vendor\vcpkg\installed\x64-windows-rocksdb\bin\rocksdb-shared.dll .\build\librocksdb.dll
3 changes: 3 additions & 0 deletions scripts/build_dlls_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ ${REPO_DIR}/vendor/vcpkg/bootstrap-vcpkg.sh -disableMetrics
${REPO_DIR}/vendor/vcpkg/vcpkg install rocksdb[lz4,zstd]:x64-windows-rocksdb --recurse --overlay-triplets=${REPO_DIR}/triplets

mkdir -p ${REPO_DIR}/build

cp ${REPO_DIR}/vendor/vcpkg/installed/x64-windows-rocksdb/bin/lz4-shared.dll ./build/liblz4.dll
cp ${REPO_DIR}/vendor/vcpkg/installed/x64-windows-rocksdb/bin/zstd-shared.dll ./build/libzstd.dll
cp ${REPO_DIR}/vendor/vcpkg/installed/x64-windows-rocksdb/bin/rocksdb-shared.dll ./build/librocksdb.dll
2 changes: 2 additions & 0 deletions scripts/build_shared_deps_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ ${REPO_DIR}/vendor/vcpkg/vcpkg install rocksdb[lz4,zstd]:x64-osx-rocksdb --recur

mkdir -p "${BUILD_DEST}"

cp "${REPO_DIR}/vendor/vcpkg/installed/x64-osx-rocksdb/lib/liblz4.dylib" "${BUILD_DEST}/"
cp "${REPO_DIR}/vendor/vcpkg/installed/x64-osx-rocksdb/lib/libzstd.dylib" "${BUILD_DEST}/"
cp "${REPO_DIR}/vendor/vcpkg/installed/x64-osx-rocksdb/lib/librocksdb.dylib" "${BUILD_DEST}/"
9 changes: 2 additions & 7 deletions triplets/x64-osx-rocksdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,5 @@ set(VCPKG_BUILD_TYPE release)
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)

if(${PORT} MATCHES "snappy|zlib|lz4|zstd")
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
else()
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
9 changes: 2 additions & 7 deletions triplets/x64-windows-rocksdb.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_BUILD_TYPE release)

if(${PORT} MATCHES "snappy|zlib|lz4|zstd")
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
else()
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE dynamic)

0 comments on commit fea0a2d

Please sign in to comment.