Skip to content

Commit b16a0db

Browse files
committed
try custom detection
1 parent 7fab6ea commit b16a0db

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

ci/scripts/cpp_build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ if [ ! -z "${CONDA_PREFIX}" ] && [ "${ARROW_EMSCRIPTEN:-OFF}" = "OFF" ]; then
4343
fi
4444
export ARROW_CMAKE_ARGS
4545
export ARROW_GANDIVA_PC_CXX_FLAGS=$(echo | ${CXX} -E -Wp,-v -xc++ - 2>&1 | grep '^ ' | awk '{print "-isystem;" substr($1, 1)}' | tr '\n' ';')
46+
47+
export LIBRARY_PATH="${CONDA_PREFIX}/lib"
48+
export CPLUS_INCLUDE_PATH="${CONDA_PREFIX}/include"
4649
elif [ -x "$(command -v xcrun)" ]; then
4750
export ARROW_GANDIVA_PC_CXX_FLAGS="-isysroot;$(xcrun --show-sdk-path)"
4851
fi

cpp/src/arrow/meson.build

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,22 @@ if needs_json
473473
endif
474474

475475
if needs_orc
476-
orc_dep = dependency('orc')
476+
# not all versions of orc installed via conda distribute
477+
# cmake/pkgconfig information, so they are undetectable
478+
# without custom logic
479+
orc_headers = ['orc/orc-config.hh']
480+
orc_lib = cpp_compiler.find_library(
481+
'orc',
482+
has_headers: orc_headers,
483+
required: false,
484+
)
485+
486+
if orc_lib.found()
487+
orc_dep = declare_dependency(dependencies: orc_lib)
488+
else
489+
orc_dep = dependency('orc')
490+
endif
491+
477492
arrow_components += {
478493
'arrow_orc': {
479494
'sources': files(

0 commit comments

Comments
 (0)