Skip to content

Commit

Permalink
Feat: Protobuf compiled for host in OSX. Fix for arm64 OSX wallet-core
Browse files Browse the repository at this point in the history
  • Loading branch information
henriqueaklein committed Jan 19, 2024
1 parent 339e643 commit 8b92044
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions build/OSX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,28 @@ set(_grpc_EXTRA_PARAM
-DgRPC_BUILD_GRPC_CSHARP_PLUGIN:BOOL=OFF
)

# --------------------------------------------------------
# Build protobuf project from the git submodule
set(PROTOBUF_SRC_DIR "${THIRDPARTY_DIR}/grpc/third_party/protobuf/cmake")

# Build protobuf project from the git submodule.
ExternalProject_Add(protobuf
PREFIX protobuf
SOURCE_DIR "${PROTOBUF_SRC_DIR}"
CMAKE_CACHE_ARGS
-Dprotobuf_BUILD_TESTS:BOOL=OFF
-Dprotobuf_WITH_ZLIB:BOOL=OFF
-Dprotobuf_MSVC_STATIC_RUNTIME:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/protobuf
-Dprotobuf_BUILD_PROTOC_BINARIES:BOOL=ON
)

set(PROTOC_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/protobuf/bin/protoc")
set(_PROTOBUF_TARGET protobuf)
set(_PROTOBUF_HOST_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/protobuf/lib/cmake/protobuf")
set(_PROTOBUF_HOST_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/protobuf/include")
set(_PROTOBUF_HOST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/protobuf/lib")

# --------------------------------------------------------
# set config for rocksdb
set(_rocksdb_EXTRA_PARAM
Expand Down

0 comments on commit 8b92044

Please sign in to comment.