in ci/conan/all/conanfile.py [0:0]
def package_info(self):
# FIXME: fix CMake targets of components
self.cpp_info.set_property("cmake_file_name", "Arrow")
suffix = "_static" if is_msvc(self) and not self.options.shared else ""
cmake_suffix = "shared" if self.options.shared else "static"
self.cpp_info.components["libarrow"].set_property("pkg_config_name", "arrow")
self.cpp_info.components["libarrow"].set_property("cmake_target_name", f"Arrow::arrow_{cmake_suffix}")
self.cpp_info.components["libarrow"].libs = [f"arrow{suffix}"]
if not self.options.shared:
self.cpp_info.components["libarrow"].defines = ["ARROW_STATIC"]
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components["libarrow"].system_libs = ["pthread", "m", "dl", "rt"]
if self.options.parquet:
self.cpp_info.components["libparquet"].set_property("pkg_config_name", "parquet")
self.cpp_info.components["libparquet"].set_property("cmake_target_name", f"Parquet::parquet_{cmake_suffix}")
self.cpp_info.components["libparquet"].libs = [f"parquet{suffix}"]
self.cpp_info.components["libparquet"].requires = ["libarrow"]
if not self.options.shared:
self.cpp_info.components["libparquet"].defines = ["PARQUET_STATIC"]
if self.options.get_safe("substrait"):
self.cpp_info.components["libarrow_substrait"].set_property("pkg_config_name", "arrow_substrait")
self.cpp_info.components["libarrow_substrait"].set_property("cmake_target_name", f"Arrow::arrow_substrait_{cmake_suffix}")
self.cpp_info.components["libarrow_substrait"].libs = [f"arrow_substrait{suffix}"]
self.cpp_info.components["libarrow_substrait"].requires = ["libparquet", "dataset"]
# Plasma was deprecated in Arrow 12.0.0
del self.options.plasma
if self.options.acero:
self.cpp_info.components["libacero"].set_property("pkg_config_name", "acero")
self.cpp_info.components["libacero"].set_property("cmake_target_name", f"Acero::arrow_acero_{cmake_suffix}")
self.cpp_info.components["libacero"].libs = [f"arrow_acero{suffix}"]
self.cpp_info.components["libacero"].names["cmake_find_package"] = "acero"
self.cpp_info.components["libacero"].names["cmake_find_package_multi"] = "acero"
self.cpp_info.components["libacero"].names["pkg_config"] = "acero"
self.cpp_info.components["libacero"].requires = ["libarrow"]
if self.options.gandiva:
self.cpp_info.components["libgandiva"].set_property("pkg_config_name", "gandiva")
self.cpp_info.components["libgandiva"].set_property("cmake_target_name", f"Gandiva::gandiva_{cmake_suffix}")
self.cpp_info.components["libgandiva"].libs = [f"gandiva{suffix}"]
self.cpp_info.components["libgandiva"].requires = ["libarrow"]
if not self.options.shared:
self.cpp_info.components["libgandiva"].defines = ["GANDIVA_STATIC"]
if self.options.with_flight_rpc:
self.cpp_info.components["libarrow_flight"].set_property("pkg_config_name", "flight_rpc")
self.cpp_info.components["libarrow_flight"].set_property("cmake_target_name", f"ArrowFlight::arrow_flight_{cmake_suffix}")
self.cpp_info.components["libarrow_flight"].libs = [f"arrow_flight{suffix}"]
self.cpp_info.components["libarrow_flight"].requires = ["libarrow"]
# https://github.com/apache/arrow/pull/43137#pullrequestreview-2267476893
if Version(self.version) >= "18.0.0" and self.options.with_openssl:
self.cpp_info.components["libarrow_flight"].requires.append("openssl::openssl")
if self.options.get_safe("with_flight_sql"):
self.cpp_info.components["libarrow_flight_sql"].set_property("pkg_config_name", "flight_sql")
self.cpp_info.components["libarrow_flight_sql"].set_property("cmake_target_name", f"ArrowFlightSql::arrow_flight_sql_{cmake_suffix}")
self.cpp_info.components["libarrow_flight_sql"].libs = [f"arrow_flight_sql{suffix}"]
self.cpp_info.components["libarrow_flight_sql"].requires = ["libarrow", "libarrow_flight"]
if self.options.dataset_modules:
self.cpp_info.components["dataset"].libs = ["arrow_dataset"]
if self.options.parquet:
self.cpp_info.components["dataset"].requires = ["libparquet"]
if self.options.cli and (self.options.with_cuda or self.options.with_flight_rpc or self.options.parquet):
binpath = os.path.join(self.package_folder, "bin")
self.output.info(f"Appending PATH env var: {binpath}")
self.env_info.PATH.append(binpath)
if self.options.with_boost:
if self.options.gandiva:
# FIXME: only filesystem component is used
self.cpp_info.components["libgandiva"].requires.append("boost::boost")
if self.options.parquet and self.settings.compiler == "gcc" and self.settings.compiler.version < Version("4.9"):
self.cpp_info.components["libparquet"].requires.append("boost::boost")
# FIXME: only headers components is used
self.cpp_info.components["libarrow"].requires.append("boost::boost")
if self.options.with_openssl:
self.cpp_info.components["libarrow"].requires.append("openssl::openssl")
if self.options.with_gflags:
self.cpp_info.components["libarrow"].requires.append("gflags::gflags")
if self.options.with_glog:
self.cpp_info.components["libarrow"].requires.append("glog::glog")
if self.options.with_jemalloc:
self.cpp_info.components["libarrow"].requires.append("jemalloc::jemalloc")
if self.options.with_mimalloc:
self.cpp_info.components["libarrow"].requires.append("mimalloc::mimalloc")
if self.options.with_re2:
if self.options.gandiva:
self.cpp_info.components["libgandiva"].requires.append("re2::re2")
if self.options.parquet:
self.cpp_info.components["libparquet"].requires.append("re2::re2")
self.cpp_info.components["libarrow"].requires.append("re2::re2")
if self.options.with_llvm:
self.cpp_info.components["libgandiva"].requires.append("llvm-core::llvm-core")
if self.options.with_protobuf:
self.cpp_info.components["libarrow"].requires.append("protobuf::protobuf")
if self.options.with_utf8proc:
self.cpp_info.components["libarrow"].requires.append("utf8proc::utf8proc")
if self.options.with_thrift:
self.cpp_info.components["libarrow"].requires.append("thrift::thrift")
if self.options.with_backtrace:
self.cpp_info.components["libarrow"].requires.append("libbacktrace::libbacktrace")
if self.options.with_cuda:
self.cpp_info.components["libarrow"].requires.append("cuda::cuda")
if self._requires_rapidjson():
self.cpp_info.components["libarrow"].requires.append("rapidjson::rapidjson")
if self.options.with_s3:
# https://github.com/apache/arrow/blob/6b268f62a8a172249ef35f093009c740c32e1f36/cpp/src/arrow/CMakeLists.txt#L98
self.cpp_info.components["libarrow"].requires.extend([f"aws-sdk-cpp::{x}" for x in ["cognito-identity", "core", "identity-management", "s3", "sts"]])
if self.options.get_safe("with_gcs"):
self.cpp_info.components["libarrow"].requires.append("google-cloud-cpp::storage")
if self.options.with_orc:
self.cpp_info.components["libarrow"].requires.append("orc::orc")
if self.options.get_safe("with_opentelemetry"):
self.cpp_info.components["libarrow"].requires.append("opentelemetry-cpp::opentelemetry-cpp")
if self.options.with_brotli:
self.cpp_info.components["libarrow"].requires.append("brotli::brotli")
if self.options.with_bz2:
self.cpp_info.components["libarrow"].requires.append("bzip2::bzip2")
if self.options.with_lz4:
self.cpp_info.components["libarrow"].requires.append("lz4::lz4")
if self.options.with_snappy:
self.cpp_info.components["libarrow"].requires.append("snappy::snappy")
if self.options.get_safe("simd_level") != None or self.options.get_safe("runtime_simd_level") != None:
self.cpp_info.components["libarrow"].requires.append("xsimd::xsimd")
if self.options.with_zlib:
self.cpp_info.components["libarrow"].requires.append("zlib::zlib")
if self.options.with_zstd:
self.cpp_info.components["libarrow"].requires.append("zstd::zstd")
if self.options.with_grpc:
self.cpp_info.components["libarrow"].requires.append("grpc::grpc")
if self.options.with_flight_rpc:
self.cpp_info.components["libarrow_flight"].requires.append("protobuf::protobuf")