Skip to content

Commit 9c0d9eb

Browse files
committed
Fix: look for protobuf_fc-install (FetchContent) in addition to protobuf_ep-install
1 parent 0e8c35e commit 9c0d9eb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ci/scripts/jni_macos_build.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,11 @@ fi
179179
# Build up the JNI CMake args based on what's available
180180
jni_cmake_args="${llvm_dir_arg}"
181181

182-
# Add Protobuf path if bundled, otherwise CMake will find system Protobuf
183-
if [ -d "${build_dir}/cpp/protobuf_ep-install" ]; then
182+
# Add Protobuf path if bundled, otherwise CMake will find system Protobuf.
183+
# Arrow 23+ uses FetchContent (protobuf_fc-install); older versions used ExternalProject (protobuf_ep-install).
184+
if [ -d "${build_dir}/cpp/protobuf_fc-install" ]; then
185+
jni_cmake_args="${jni_cmake_args} -DProtobuf_ROOT=${build_dir}/cpp/protobuf_fc-install"
186+
elif [ -d "${build_dir}/cpp/protobuf_ep-install" ]; then
184187
jni_cmake_args="${jni_cmake_args} -DProtobuf_ROOT=${build_dir}/cpp/protobuf_ep-install"
185188
fi
186189

0 commit comments

Comments
 (0)