This is an automated email from the ASF dual-hosted git repository.
gangwu pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new f09886240 ORC-1637: [C++] Port conan recipe from upstream conan center
f09886240 is described below
commit f09886240f0f15e33b3785ac5fc994539bc22f11
Author: Gang Wu <[email protected]>
AuthorDate: Wed Feb 28 09:20:15 2024 +0800
ORC-1637: [C++] Port conan recipe from upstream conan center
### What changes were proposed in this pull request?
Port conan recipe back from the conan center index.
### Why are the changes needed?
To keep it in sync with the upstream.
### How was this patch tested?
Tested it locally. This has been tested by the CIs of conan center index.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #1824 from wgtmac/conan-center.
Authored-by: Gang Wu <[email protected]>
Signed-off-by: Gang Wu <[email protected]>
(cherry picked from commit 0c6f3e70a51485547a27e8838fbf86f373d5e3cd)
Signed-off-by: Gang Wu <[email protected]>
---
cmake_modules/ThirdpartyToolchain.cmake | 15 +-
conan/all/ConanThirdpartyToolchain.cmake | 67 +++++++
conan/{ => all}/conandata.yml | 7 -
conan/all/conanfile.py | 196 +++++++++++++++++++++
conan/{ => all}/test_package/CMakeLists.txt | 9 +-
conan/{ => all}/test_package/conanfile.py | 15 +-
.../test_package/test_package.cpp} | 0
conan/conanfile.py | 120 -------------
conan/{test_package/CMakeLists.txt => config.yml} | 14 +-
.../patches/0001-thirdparty-toolchain-1.7.x.patch | 184 -------------------
.../patches/0001-thirdparty-toolchain-1.8.x.patch | 183 -------------------
.../patches/0001-thirdparty-toolchain-1.9.x.patch | 182 -------------------
12 files changed, 290 insertions(+), 702 deletions(-)
diff --git a/cmake_modules/ThirdpartyToolchain.cmake
b/cmake_modules/ThirdpartyToolchain.cmake
index 1e7ef939a..aa520ff61 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -475,15 +475,14 @@ else ()
target_include_directories (orc_protobuf SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
endif ()
-if (ORC_PACKAGE_KIND STREQUAL "conan")
- cmake_path(GET protobuf_INCLUDE_DIR PARENT_PATH PROTOBUF_HOME)
- set(PROTOBUF_EXECUTABLE ${PROTOBUF_HOME}/bin/protoc)
-elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB})
-else ()
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY})
+if (NOT ORC_PACKAGE_KIND STREQUAL "conan")
+ if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
+ target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB})
+ else ()
+ target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY})
+ endif()
+ target_include_directories (orc_protoc SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
endif()
-target_include_directories (orc_protoc SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
if (PROTOBUF_VENDORED)
add_dependencies (orc_protoc protobuf_ep)
diff --git a/conan/all/ConanThirdpartyToolchain.cmake
b/conan/all/ConanThirdpartyToolchain.cmake
new file mode 100644
index 000000000..b0b847424
--- /dev/null
+++ b/conan/all/ConanThirdpartyToolchain.cmake
@@ -0,0 +1,67 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# ----------------------------------------------------------------------
+# Snappy
+
+find_package (Snappy REQUIRED)
+
+add_library (orc_snappy INTERFACE)
+add_library (orc::snappy ALIAS orc_snappy)
+target_link_libraries(orc_snappy INTERFACE Snappy::snappy)
+
+# ----------------------------------------------------------------------
+# ZLIB
+
+find_package (ZLIB REQUIRED)
+
+add_library (orc_zlib INTERFACE)
+add_library (orc::zlib ALIAS orc_zlib)
+target_link_libraries (orc_zlib INTERFACE ZLIB::ZLIB)
+
+# ----------------------------------------------------------------------
+# Zstd
+
+find_package (ZSTD REQUIRED)
+
+add_library (orc_zstd INTERFACE)
+add_library (orc::zstd ALIAS orc_zstd)
+target_link_libraries (orc_zstd INTERFACE
+ $<TARGET_NAME_IF_EXISTS:zstd::libzstd_static>
+ $<TARGET_NAME_IF_EXISTS:zstd::libzstd_shared>
+)
+
+# ----------------------------------------------------------------------
+# LZ4
+
+find_package (LZ4 REQUIRED)
+
+add_library (orc_lz4 INTERFACE)
+add_library (orc::lz4 ALIAS orc_lz4)
+target_link_libraries (orc_lz4 INTERFACE
+ $<TARGET_NAME_IF_EXISTS:LZ4::lz4_shared>
+ $<TARGET_NAME_IF_EXISTS:LZ4::lz4_static>
+)
+
+# ----------------------------------------------------------------------
+# Protobuf
+
+find_package (Protobuf REQUIRED)
+
+add_library (orc_protobuf INTERFACE)
+add_library (orc::protobuf ALIAS orc_protobuf)
+target_link_libraries (orc_protobuf INTERFACE protobuf::protobuf)
diff --git a/conan/conandata.yml b/conan/all/conandata.yml
similarity index 84%
rename from conan/conandata.yml
rename to conan/all/conandata.yml
index c0e126fc2..7889791c6 100644
--- a/conan/conandata.yml
+++ b/conan/all/conandata.yml
@@ -25,10 +25,3 @@ sources:
"1.7.10":
url: "https://dlcdn.apache.org/orc/orc-1.7.10/orc-1.7.10.tar.gz"
sha256: "85aef9368dc9bcdffaaf10010b66dfe053ce22f30b64854f63852248164686a3"
-patches:
- "1.9.2":
- - patch_file: "patches/0001-thirdparty-toolchain-1.9.x.patch"
- "1.8.6":
- - patch_file: "patches/0001-thirdparty-toolchain-1.8.x.patch"
- "1.7.10":
- - patch_file: "patches/0001-thirdparty-toolchain-1.7.x.patch"
diff --git a/conan/all/conanfile.py b/conan/all/conanfile.py
new file mode 100644
index 000000000..9e45cd46d
--- /dev/null
+++ b/conan/all/conanfile.py
@@ -0,0 +1,196 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import os
+
+from conan import ConanFile
+from conan.errors import ConanInvalidConfiguration
+from conan.tools.build import check_min_cppstd
+from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
+from conan.tools.env import VirtualBuildEnv, VirtualRunEnv
+from conan.tools.files import copy, get, rmdir, replace_in_file, mkdir
+from conan.tools.scm import Version
+
+required_conan_version = ">=1.60.0 <2.0 || >=2.0.5"
+
+class OrcRecipe(ConanFile):
+ name = "orc"
+ description = "ORC is a self-describing type-aware columnar file format
designed for Hadoop workloads"
+ license = "Apache-2.0"
+ homepage = "https://orc.apache.org/"
+ url = "https://github.com/conan-io/conan-center-index"
+ topics = ("orc", "columnar", "file-format", "hadoop")
+
+ package_type = "library"
+ settings = "os", "arch", "compiler", "build_type"
+ options = {
+ "shared": [True, False],
+ "fPIC": [True, False],
+ "build_tools": [True, False],
+ "build_avx512": [True, False],
+ }
+ default_options = {
+ "shared": False,
+ "fPIC": True,
+ "build_tools": False,
+ "build_avx512": True,
+ }
+
+ @property
+ def _min_cppstd(self):
+ return 17
+
+ @property
+ def _compilers_minimum_version(self):
+ return {
+ "Visual Studio": "16",
+ "msvc": "192",
+ "gcc": "8",
+ "clang": "7",
+ "apple-clang": "12",
+ }
+
+ @property
+ def _is_legacy_one_profile(self):
+ return not hasattr(self, "settings_build")
+
+ @property
+ def _should_patch_thirdparty_toolchain(self):
+ return self.version < "2.0.0"
+
+ def export_sources(self):
+ if self._should_patch_thirdparty_toolchain:
+ copy(self, "ConanThirdpartyToolchain.cmake",
+ self.recipe_folder, os.path.join(self.export_sources_folder,
"src", "cmake_modules"))
+
+ def config_options(self):
+ if self.settings.os == "Windows":
+ del self.options.fPIC
+ if self.settings.compiler == "apple-clang":
+ # AVX support is not enabled by default, might need to add
-mavx512f to CXXFLAGS
+ del self.options.build_avx512
+
+ def configure(self):
+ if self.options.shared:
+ self.options.rm_safe("fPIC")
+
+ def layout(self):
+ cmake_layout(self, src_folder="src", build_folder="build")
+
+ def requirements(self):
+ self.requires("protobuf/3.21.12")
+ self.requires("lz4/1.9.4")
+ self.requires("snappy/1.1.9")
+ self.requires("zlib/[>=1.2.11 <2]")
+ self.requires("zstd/1.5.5")
+
+ def validate(self):
+ if self.settings.compiler.cppstd:
+ check_min_cppstd(self, self._min_cppstd)
+ minimum_version =
self._compilers_minimum_version.get(str(self.settings.compiler), False)
+ if minimum_version and Version(self.settings.compiler.version) <
minimum_version:
+ raise ConanInvalidConfiguration(
+ f"{self.ref} requires C++{self._min_cppstd}, which your
compiler does not support."
+ )
+
+ def build_requirements(self):
+ if not self._is_legacy_one_profile:
+ self.tool_requires("protobuf/<host_version>")
+
+ def source(self):
+ # START
+ # This block should be removed when we update upstream:
+ #
https://github.com/conan-io/conan-center-index/tree/master/recipes/orc/
+ if not self.version in self.conan_data.get("sources", {}):
+ import shutil
+ top_level = os.environ.get("ORC_HOME")
+ shutil.copytree(os.path.join(top_level, "c++"),
+ os.path.join(self.source_folder, "c++"))
+ shutil.copytree(os.path.join(top_level, "cmake_modules"),
+ os.path.join(self.source_folder, "cmake_modules"))
+ top_level_files = [
+ "CMakeLists.txt",
+ "LICENSE",
+ "NOTICE",
+ ]
+ for top_level_file in top_level_files:
+ shutil.copy(os.path.join(top_level, top_level_file),
+ self.source_folder)
+ return
+ # END
+ get(self, **self.conan_data["sources"][self.version], strip_root=True)
+
+ def generate(self):
+ VirtualBuildEnv(self).generate()
+ VirtualRunEnv(self).generate(scope="build")
+
+ tc = CMakeToolchain(self)
+ tc.variables["ORC_PACKAGE_KIND"] = "conan"
+ tc.variables["BUILD_JAVA"] = False
+ tc.variables["BUILD_CPP_TESTS"] = False
+ tc.variables["BUILD_TOOLS"] = self.options.build_tools
+ tc.variables["BUILD_LIBHDFSPP"] = False
+ tc.variables["BUILD_POSITION_INDEPENDENT_LIB"] =
bool(self.options.get_safe("fPIC", True))
+ tc.variables["INSTALL_VENDORED_LIBS"] = False
+ # AVX512 support is determined by ORC_USER_SIMD_LEVEL env var at
runtime, defaults to off
+ tc.variables["BUILD_ENABLE_AVX512"] =
self.options.get_safe("build_avx512", False)
+ tc.variables["STOP_BUILD_ON_WARNING"] = False
+ tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True
+
+ # CMake versions less than 3.12 are supported by ORC pre-1.9.0
versions.
+ # Setting policy CMP0077 to NEW to remove unnecessary cache_variables
settings.
+ if self.version < "1.9.0":
+ tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW"
+
+ protoc_path =
os.path.join(self.dependencies["protobuf"].cpp_info.bindir, "protoc")
+ tc.variables["PROTOBUF_EXECUTABLE"] = protoc_path.replace("\\", "/")
+ tc.variables["HAS_POST_2038"] = self.settings.os != "Windows"
+ tc.variables["HAS_PRE_1970"] = self.settings.os != "Windows"
+ tc.generate()
+
+ deps = CMakeDeps(self)
+ deps.generate()
+
+ def _patch_sources(self):
+ if self._should_patch_thirdparty_toolchain:
+ replace_in_file(self, os.path.join(self.source_folder,
"CMakeLists.txt"),
+ "ThirdpartyToolchain", "ConanThirdpartyToolchain")
+ # Allow shared builds
+ replace_in_file(self, os.path.join(self.source_folder, "c++", "src",
"CMakeLists.txt"),
+ "add_library (orc STATIC ${SOURCE_FILES})",
"add_library (orc ${SOURCE_FILES})")
+
+ def build(self):
+ self._patch_sources()
+ cmake = CMake(self)
+ cmake.configure()
+ cmake.build()
+
+ def package(self):
+ copy(self, "LICENSE", self.source_folder,
os.path.join(self.package_folder, "licenses"))
+ copy(self, "NOTICE", self.source_folder,
os.path.join(self.package_folder, "licenses"))
+ cmake = CMake(self)
+ cmake.install()
+ rmdir(self, os.path.join(self.package_folder, "share"))
+ if self.settings.os == "Windows" and self.options.shared:
+ mkdir(self, os.path.join(self.package_folder, "bin"))
+ os.rename(os.path.join(self.package_folder, "lib", "orc.dll"),
+ os.path.join(self.package_folder, "bin", "orc.dll"))
+
+ def package_info(self):
+ self.cpp_info.libs = ["orc"]
+ if self.settings.os in ["Linux", "FreeBSD"]:
+ self.cpp_info.system_libs = ["pthread", "m"]
diff --git a/conan/test_package/CMakeLists.txt
b/conan/all/test_package/CMakeLists.txt
similarity index 77%
copy from conan/test_package/CMakeLists.txt
copy to conan/all/test_package/CMakeLists.txt
index 58279fc14..1bc6bb47d 100644
--- a/conan/test_package/CMakeLists.txt
+++ b/conan/all/test_package/CMakeLists.txt
@@ -16,9 +16,10 @@
# under the License.
cmake_minimum_required(VERSION 3.15)
-project(PackageTest CXX)
+project(test_package LANGUAGES CXX)
-find_package(orc CONFIG REQUIRED)
+find_package(orc REQUIRED CONFIG)
-add_executable(example src/example.cpp)
-target_link_libraries(example orc::orc)
+add_executable(${PROJECT_NAME} test_package.cpp)
+target_link_libraries(${PROJECT_NAME} PRIVATE orc::orc)
+target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
diff --git a/conan/test_package/conanfile.py
b/conan/all/test_package/conanfile.py
similarity index 83%
rename from conan/test_package/conanfile.py
rename to conan/all/test_package/conanfile.py
index c47c37709..eafb696bd 100644
--- a/conan/test_package/conanfile.py
+++ b/conan/all/test_package/conanfile.py
@@ -21,22 +21,23 @@ from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout
from conan.tools.build import can_run
-class OrcTestConan(ConanFile):
- settings = "os", "compiler", "build_type", "arch"
- generators = "CMakeDeps", "CMakeToolchain"
+class TestPackageConan(ConanFile):
+ settings = "os", "arch", "compiler", "build_type"
+ generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
+ test_type = "explicit"
def requirements(self):
self.requires(self.tested_reference_str)
+ def layout(self):
+ cmake_layout(self)
+
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
- def layout(self):
- cmake_layout(self)
-
def test(self):
if can_run(self):
- cmd = os.path.join(self.cpp.build.bindir, "example")
+ cmd = os.path.join(self.cpp.build.bindir, "test_package")
self.run(cmd, env="conanrun")
diff --git a/conan/test_package/src/example.cpp
b/conan/all/test_package/test_package.cpp
similarity index 100%
rename from conan/test_package/src/example.cpp
rename to conan/all/test_package/test_package.cpp
diff --git a/conan/conanfile.py b/conan/conanfile.py
deleted file mode 100644
index 18f911088..000000000
--- a/conan/conanfile.py
+++ /dev/null
@@ -1,120 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-from conan import ConanFile
-from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
-from conan.tools.files import apply_conandata_patches,
export_conandata_patches, get, copy, rmdir
-from conan.tools.scm import Version
-
-import os
-
-required_conan_version = ">=1.54.0"
-
-class OrcRecipe(ConanFile):
- name = "orc"
- description = "The smallest, fastest columnar storage for Hadoop workloads"
- license = "Apache-2.0"
- url = "https://github.com/conan-io/conan-center-index"
- homepage = "https://orc.apache.org/"
- topics = ("orc", "columnar-storage", "hadoop")
- settings = "os", "compiler", "build_type", "arch"
- options = {
- "shared": [False],
- "fPIC": [True, False],
- }
- default_options = {
- "shared": False,
- "fPIC": True,
- }
-
- @property
- def _minimum_cpp_standard(self):
- return 11 if Version(self.version) < "1.9.0" else 17
-
- def source(self):
- if not self.version in self.conan_data.get("sources", {}):
- import shutil
- top_level = os.environ.get("ORC_HOME")
- shutil.copytree(os.path.join(top_level, "c++"),
- os.path.join(self.source_folder, "c++"))
- shutil.copytree(os.path.join(top_level, "cmake_modules"),
- os.path.join(self.source_folder, "cmake_modules"))
- top_level_files = [
- "CMakeLists.txt",
- "LICENSE",
- "NOTICE",
- ]
- for top_level_file in top_level_files:
- shutil.copy(os.path.join(top_level, top_level_file),
- self.source_folder)
- return
- get(self, **self.conan_data["sources"][self.version], strip_root=True)
-
- def config_options(self):
- if self.settings.os == "Windows":
- self.options.rm_safe("fPIC")
-
- def configure(self):
- if self.options.shared:
- self.options.rm_safe("fPIC")
-
- def export_sources(self):
- export_conandata_patches(self)
-
- def requirements(self):
- self.requires("protobuf/3.19.4")
- self.requires("zlib/1.3")
- self.requires("snappy/1.1.9")
- self.requires("lz4/1.9.4")
- self.requires("zstd/1.5.5")
-
- def layout(self):
- cmake_layout(self, src_folder="src", build_folder="build")
-
- def generate(self):
- deps = CMakeDeps(self)
- deps.generate()
- tc = CMakeToolchain(self)
- tc.variables["ORC_PACKAGE_KIND"] = "conan"
- tc.variables["BUILD_JAVA"] = "OFF"
- tc.variables["BUILD_CPP_TESTS"] = "OFF"
- tc.variables["BUILD_TOOLS"] = "OFF"
- tc.variables["BUILD_LIBHDFSPP"] = "OFF"
- tc.variables["BUILD_POSITION_INDEPENDENT_LIB"] =
bool(self.options.get_safe("fPIC", True))
- tc.variables["INSTALL_VENDORED_LIBS"] = "OFF"
- tc.generate()
-
- def build(self):
- apply_conandata_patches(self)
- cmake = CMake(self)
- cmake.configure()
- cmake.build()
-
- def package(self):
- copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder,
"licenses"), src=self.source_folder)
- copy(self, pattern="NOTICE", dst=os.path.join(self.package_folder,
"licenses"), src=self.source_folder)
- cmake = CMake(self)
- cmake.install()
- rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
- rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
- rmdir(self, os.path.join(self.package_folder, "share"))
-
- def package_info(self):
- self.cpp_info.set_property("cmake_file_name", "orc")
- self.cpp_info.set_property("cmake_target_name", "orc::orc")
- self.cpp_info.set_property("pkg_config_name", "liborc")
- self.cpp_info.libs = ["orc"]
diff --git a/conan/test_package/CMakeLists.txt b/conan/config.yml
similarity index 81%
rename from conan/test_package/CMakeLists.txt
rename to conan/config.yml
index 58279fc14..14965e99b 100644
--- a/conan/test_package/CMakeLists.txt
+++ b/conan/config.yml
@@ -15,10 +15,10 @@
# specific language governing permissions and limitations
# under the License.
-cmake_minimum_required(VERSION 3.15)
-project(PackageTest CXX)
-
-find_package(orc CONFIG REQUIRED)
-
-add_executable(example src/example.cpp)
-target_link_libraries(example orc::orc)
+versions:
+ "1.9.2":
+ folder: all
+ "1.8.6":
+ folder: all
+ "1.7.10":
+ folder: all
diff --git a/conan/patches/0001-thirdparty-toolchain-1.7.x.patch
b/conan/patches/0001-thirdparty-toolchain-1.7.x.patch
deleted file mode 100644
index 2f64f3b79..000000000
--- a/conan/patches/0001-thirdparty-toolchain-1.7.x.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 93bd1035b..57c83b961 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -68,6 +68,10 @@ option(BUILD_POSITION_INDEPENDENT_LIB
- "Compile static libraries with position independent code"
- OFF)
-
-+option(ORC_PACKAGE_KIND
-+ "Arbitrary string that identifies the kind of package"
-+ "")
-+
- # Make sure that a build type is selected
- if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to ReleaseWithDebugInfo")
-
-diff --git a/cmake_modules/ThirdpartyToolchain.cmake
b/cmake_modules/ThirdpartyToolchain.cmake
-index a394d7315..3cd3e9faa 100644
---- a/cmake_modules/ThirdpartyToolchain.cmake
-+++ b/cmake_modules/ThirdpartyToolchain.cmake
-@@ -71,7 +71,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Snappy
-
--if (NOT "${SNAPPY_HOME}" STREQUAL "")
-+if (NOT "${SNAPPY_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (Snappy REQUIRED)
- set(SNAPPY_VENDORED FALSE)
- else ()
-@@ -97,12 +97,18 @@ endif ()
-
- add_library (orc_snappy INTERFACE)
- add_library (orc::snappy ALIAS orc_snappy)
--if (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries(orc_snappy INTERFACE ${Snappy_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
- target_link_libraries(orc_snappy INTERFACE ${SNAPPY_STATIC_LIB})
- else ()
- target_link_libraries(orc_snappy INTERFACE ${SNAPPY_LIBRARY})
- endif ()
--target_include_directories (orc_snappy SYSTEM INTERFACE ${SNAPPY_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_snappy SYSTEM INTERFACE
${Snappy_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_snappy SYSTEM INTERFACE
${SNAPPY_INCLUDE_DIR})
-+endif ()
-
- if (SNAPPY_VENDORED)
- add_dependencies (orc_snappy snappy_ep)
-@@ -115,7 +121,7 @@ endif ()
- # ----------------------------------------------------------------------
- # ZLIB
-
--if (NOT "${ZLIB_HOME}" STREQUAL "")
-+if (NOT "${ZLIB_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (ZLIB REQUIRED)
- set(ZLIB_VENDORED FALSE)
- else ()
-@@ -149,7 +155,9 @@ endif ()
-
- add_library (orc_zlib INTERFACE)
- add_library (orc::zlib ALIAS orc_zlib)
--if (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
- target_link_libraries (orc_zlib INTERFACE ${ZLIB_STATIC_LIB})
- else ()
- target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARY})
-@@ -167,7 +175,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Zstd
-
--if (NOT "${ZSTD_HOME}" STREQUAL "")
-+if (NOT "${ZSTD_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (ZSTD REQUIRED)
- set(ZSTD_VENDORED FALSE)
- else ()
-@@ -208,12 +216,18 @@ endif ()
-
- add_library (orc_zstd INTERFACE)
- add_library (orc::zstd ALIAS orc_zstd)
--if (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_zstd INTERFACE ${zstd_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
- target_link_libraries (orc_zstd INTERFACE ${ZSTD_STATIC_LIB})
- else ()
- target_link_libraries (orc_zstd INTERFACE ${ZSTD_LIBRARY})
- endif ()
--target_include_directories (orc_zstd SYSTEM INTERFACE ${ZSTD_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_zstd SYSTEM INTERFACE ${zstd_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_zstd SYSTEM INTERFACE ${ZSTD_INCLUDE_DIR})
-+endif ()
-
- if (ZSTD_VENDORED)
- add_dependencies (orc_zstd zstd_ep)
-@@ -226,7 +240,7 @@ endif ()
- # ----------------------------------------------------------------------
- # LZ4
-
--if (NOT "${LZ4_HOME}" STREQUAL "")
-+if (NOT "${LZ4_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (LZ4 REQUIRED)
- set(LZ4_VENDORED FALSE)
- else ()
-@@ -260,12 +274,18 @@ endif ()
-
- add_library (orc_lz4 INTERFACE)
- add_library (orc::lz4 ALIAS orc_lz4)
--if (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_lz4 INTERFACE ${lz4_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
- target_link_libraries (orc_lz4 INTERFACE ${LZ4_STATIC_LIB})
- else ()
- target_link_libraries (orc_lz4 INTERFACE ${LZ4_LIBRARY})
- endif ()
--target_include_directories (orc_lz4 SYSTEM INTERFACE ${LZ4_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_lz4 SYSTEM INTERFACE ${lz4_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_lz4 SYSTEM INTERFACE ${LZ4_INCLUDE_DIR})
-+endif ()
-
- if (LZ4_VENDORED)
- add_dependencies (orc_lz4 lz4_ep)
-@@ -377,7 +397,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Protobuf
-
--if (NOT "${PROTOBUF_HOME}" STREQUAL "")
-+if (NOT "${PROTOBUF_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (Protobuf REQUIRED)
- set(PROTOBUF_VENDORED FALSE)
- else ()
-@@ -426,14 +446,23 @@ add_library (orc::protobuf ALIAS orc_protobuf)
- add_library (orc_protoc INTERFACE)
- add_library (orc::protoc ALIAS orc_protoc)
-
--if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_protobuf INTERFACE ${protobuf_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_STATIC_LIB})
- else ()
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_LIBRARY})
- endif()
--target_include_directories (orc_protobuf SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_protobuf SYSTEM INTERFACE
${protobuf_INCLUDE_DIR})
-+else ()
-+ target_include_directories (orc_protobuf SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
-+endif ()
-
--if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ cmake_path(GET protobuf_INCLUDE_DIR PARENT_PATH PROTOBUF_HOME)
-+ set(PROTOBUF_EXECUTABLE ${PROTOBUF_HOME}/bin/protoc)
-+elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB})
- else ()
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY})
diff --git a/conan/patches/0001-thirdparty-toolchain-1.8.x.patch
b/conan/patches/0001-thirdparty-toolchain-1.8.x.patch
deleted file mode 100644
index b2157030f..000000000
--- a/conan/patches/0001-thirdparty-toolchain-1.8.x.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index de0869dc7..df66939c4 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -68,6 +68,10 @@ option(BUILD_POSITION_INDEPENDENT_LIB
- "Compile static libraries with position independent code"
- OFF)
-
-+option(ORC_PACKAGE_KIND
-+ "Arbitrary string that identifies the kind of package"
-+ "")
-+
- # Make sure that a build type is selected
- if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to ReleaseWithDebugInfo")
-
-diff --git a/cmake_modules/ThirdpartyToolchain.cmake
b/cmake_modules/ThirdpartyToolchain.cmake
-index a394d7315..3cd3e9faa 100644
---- a/cmake_modules/ThirdpartyToolchain.cmake
-+++ b/cmake_modules/ThirdpartyToolchain.cmake
-@@ -71,7 +71,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Snappy
-
--if (NOT "${SNAPPY_HOME}" STREQUAL "")
-+if (NOT "${SNAPPY_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (Snappy REQUIRED)
- set(SNAPPY_VENDORED FALSE)
- else ()
-@@ -97,12 +97,18 @@ endif ()
-
- add_library (orc_snappy INTERFACE)
- add_library (orc::snappy ALIAS orc_snappy)
--if (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries(orc_snappy INTERFACE ${Snappy_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
- target_link_libraries(orc_snappy INTERFACE ${SNAPPY_STATIC_LIB})
- else ()
- target_link_libraries(orc_snappy INTERFACE ${SNAPPY_LIBRARY})
- endif ()
--target_include_directories (orc_snappy SYSTEM INTERFACE ${SNAPPY_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_snappy SYSTEM INTERFACE
${Snappy_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_snappy SYSTEM INTERFACE
${SNAPPY_INCLUDE_DIR})
-+endif ()
-
- if (SNAPPY_VENDORED)
- add_dependencies (orc_snappy snappy_ep)
-@@ -115,7 +121,7 @@ endif ()
- # ----------------------------------------------------------------------
- # ZLIB
-
--if (NOT "${ZLIB_HOME}" STREQUAL "")
-+if (NOT "${ZLIB_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (ZLIB REQUIRED)
- set(ZLIB_VENDORED FALSE)
- else ()
-@@ -149,7 +155,9 @@ endif ()
-
- add_library (orc_zlib INTERFACE)
- add_library (orc::zlib ALIAS orc_zlib)
--if (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
- target_link_libraries (orc_zlib INTERFACE ${ZLIB_STATIC_LIB})
- else ()
- target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARY})
-@@ -167,7 +175,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Zstd
-
--if (NOT "${ZSTD_HOME}" STREQUAL "")
-+if (NOT "${ZSTD_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (ZSTD REQUIRED)
- set(ZSTD_VENDORED FALSE)
- else ()
-@@ -208,12 +216,18 @@ endif ()
-
- add_library (orc_zstd INTERFACE)
- add_library (orc::zstd ALIAS orc_zstd)
--if (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_zstd INTERFACE ${zstd_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
- target_link_libraries (orc_zstd INTERFACE ${ZSTD_STATIC_LIB})
- else ()
- target_link_libraries (orc_zstd INTERFACE ${ZSTD_LIBRARY})
- endif ()
--target_include_directories (orc_zstd SYSTEM INTERFACE ${ZSTD_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_zstd SYSTEM INTERFACE ${zstd_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_zstd SYSTEM INTERFACE ${ZSTD_INCLUDE_DIR})
-+endif ()
-
- if (ZSTD_VENDORED)
- add_dependencies (orc_zstd zstd_ep)
-@@ -226,7 +240,7 @@ endif ()
- # ----------------------------------------------------------------------
- # LZ4
-
--if (NOT "${LZ4_HOME}" STREQUAL "")
-+if (NOT "${LZ4_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (LZ4 REQUIRED)
- set(LZ4_VENDORED FALSE)
- else ()
-@@ -260,12 +274,18 @@ endif ()
-
- add_library (orc_lz4 INTERFACE)
- add_library (orc::lz4 ALIAS orc_lz4)
--if (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_lz4 INTERFACE ${lz4_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
- target_link_libraries (orc_lz4 INTERFACE ${LZ4_STATIC_LIB})
- else ()
- target_link_libraries (orc_lz4 INTERFACE ${LZ4_LIBRARY})
- endif ()
--target_include_directories (orc_lz4 SYSTEM INTERFACE ${LZ4_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_lz4 SYSTEM INTERFACE ${lz4_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_lz4 SYSTEM INTERFACE ${LZ4_INCLUDE_DIR})
-+endif ()
-
- if (LZ4_VENDORED)
- add_dependencies (orc_lz4 lz4_ep)
-@@ -377,7 +397,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Protobuf
-
--if (NOT "${PROTOBUF_HOME}" STREQUAL "")
-+if (NOT "${PROTOBUF_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (Protobuf REQUIRED)
- set(PROTOBUF_VENDORED FALSE)
- else ()
-@@ -426,14 +446,23 @@ add_library (orc::protobuf ALIAS orc_protobuf)
- add_library (orc_protoc INTERFACE)
- add_library (orc::protoc ALIAS orc_protoc)
-
--if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_protobuf INTERFACE ${protobuf_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_STATIC_LIB})
- else ()
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_LIBRARY})
- endif()
--target_include_directories (orc_protobuf SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_protobuf SYSTEM INTERFACE
${protobuf_INCLUDE_DIR})
-+else ()
-+ target_include_directories (orc_protobuf SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
-+endif ()
-
--if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ cmake_path(GET protobuf_INCLUDE_DIR PARENT_PATH PROTOBUF_HOME)
-+ set(PROTOBUF_EXECUTABLE ${PROTOBUF_HOME}/bin/protoc)
-+elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB})
- else ()
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY})
diff --git a/conan/patches/0001-thirdparty-toolchain-1.9.x.patch
b/conan/patches/0001-thirdparty-toolchain-1.9.x.patch
deleted file mode 100644
index 4164855a1..000000000
--- a/conan/patches/0001-thirdparty-toolchain-1.9.x.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3cbd88632..dd4e154c5 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -76,6 +76,10 @@ option(BUILD_ENABLE_AVX512
- "Enable build with AVX512 at compile time"
- OFF)
-
-+option(ORC_PACKAGE_KIND
-+ "Arbitrary string that identifies the kind of package"
-+ "")
-+
- # Make sure that a build type is selected
- if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to ReleaseWithDebugInfo")
-diff --git a/cmake_modules/ThirdpartyToolchain.cmake
b/cmake_modules/ThirdpartyToolchain.cmake
-index 47c1a65ba..8695918a6 100644
---- a/cmake_modules/ThirdpartyToolchain.cmake
-+++ b/cmake_modules/ThirdpartyToolchain.cmake
-@@ -71,7 +71,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Snappy
-
--if (NOT "${SNAPPY_HOME}" STREQUAL "")
-+if (NOT "${SNAPPY_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (Snappy REQUIRED)
- set(SNAPPY_VENDORED FALSE)
- else ()
-@@ -97,12 +97,18 @@ endif ()
-
- add_library (orc_snappy INTERFACE)
- add_library (orc::snappy ALIAS orc_snappy)
--if (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries(orc_snappy INTERFACE ${Snappy_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
- target_link_libraries(orc_snappy INTERFACE ${SNAPPY_STATIC_LIB})
- else ()
- target_link_libraries(orc_snappy INTERFACE ${SNAPPY_LIBRARY})
- endif ()
--target_include_directories (orc_snappy SYSTEM INTERFACE ${SNAPPY_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_snappy SYSTEM INTERFACE
${Snappy_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_snappy SYSTEM INTERFACE
${SNAPPY_INCLUDE_DIR})
-+endif ()
-
- if (SNAPPY_VENDORED)
- add_dependencies (orc_snappy snappy_ep)
-@@ -115,7 +121,7 @@ endif ()
- # ----------------------------------------------------------------------
- # ZLIB
-
--if (NOT "${ZLIB_HOME}" STREQUAL "")
-+if (NOT "${ZLIB_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (ZLIB REQUIRED)
- set(ZLIB_VENDORED FALSE)
- else ()
-@@ -149,7 +155,9 @@ endif ()
-
- add_library (orc_zlib INTERFACE)
- add_library (orc::zlib ALIAS orc_zlib)
--if (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
- target_link_libraries (orc_zlib INTERFACE ${ZLIB_STATIC_LIB})
- else ()
- target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARY})
-@@ -167,7 +175,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Zstd
-
--if (NOT "${ZSTD_HOME}" STREQUAL "")
-+if (NOT "${ZSTD_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (ZSTD REQUIRED)
- set(ZSTD_VENDORED FALSE)
- else ()
-@@ -208,12 +216,18 @@ endif ()
-
- add_library (orc_zstd INTERFACE)
- add_library (orc::zstd ALIAS orc_zstd)
--if (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_zstd INTERFACE ${zstd_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
- target_link_libraries (orc_zstd INTERFACE ${ZSTD_STATIC_LIB})
- else ()
- target_link_libraries (orc_zstd INTERFACE ${ZSTD_LIBRARY})
- endif ()
--target_include_directories (orc_zstd SYSTEM INTERFACE ${ZSTD_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_zstd SYSTEM INTERFACE ${zstd_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_zstd SYSTEM INTERFACE ${ZSTD_INCLUDE_DIR})
-+endif ()
-
- if (ZSTD_VENDORED)
- add_dependencies (orc_zstd zstd_ep)
-@@ -226,7 +240,7 @@ endif ()
- # ----------------------------------------------------------------------
- # LZ4
-
--if (NOT "${LZ4_HOME}" STREQUAL "")
-+if (NOT "${LZ4_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (LZ4 REQUIRED)
- set(LZ4_VENDORED FALSE)
- else ()
-@@ -260,12 +274,18 @@ endif ()
-
- add_library (orc_lz4 INTERFACE)
- add_library (orc::lz4 ALIAS orc_lz4)
--if (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_lz4 INTERFACE ${lz4_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
- target_link_libraries (orc_lz4 INTERFACE ${LZ4_STATIC_LIB})
- else ()
- target_link_libraries (orc_lz4 INTERFACE ${LZ4_LIBRARY})
- endif ()
--target_include_directories (orc_lz4 SYSTEM INTERFACE ${LZ4_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_lz4 SYSTEM INTERFACE ${lz4_INCLUDE_DIR})
-+else()
-+ target_include_directories (orc_lz4 SYSTEM INTERFACE ${LZ4_INCLUDE_DIR})
-+endif ()
-
- if (LZ4_VENDORED)
- add_dependencies (orc_lz4 lz4_ep)
-@@ -381,7 +401,7 @@ endif ()
- # ----------------------------------------------------------------------
- # Protobuf
-
--if (NOT "${PROTOBUF_HOME}" STREQUAL "")
-+if (NOT "${PROTOBUF_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
- find_package (Protobuf REQUIRED)
- set(PROTOBUF_VENDORED FALSE)
- else ()
-@@ -430,14 +450,23 @@ add_library (orc::protobuf ALIAS orc_protobuf)
- add_library (orc_protoc INTERFACE)
- add_library (orc::protoc ALIAS orc_protoc)
-
--if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_link_libraries (orc_protobuf INTERFACE ${protobuf_LIBRARIES})
-+elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_STATIC_LIB})
- else ()
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_LIBRARY})
- endif()
--target_include_directories (orc_protobuf SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ target_include_directories (orc_protobuf SYSTEM INTERFACE
${protobuf_INCLUDE_DIR})
-+else ()
-+ target_include_directories (orc_protobuf SYSTEM INTERFACE
${PROTOBUF_INCLUDE_DIR})
-+endif ()
-
--if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
-+if (ORC_PACKAGE_KIND STREQUAL "conan")
-+ cmake_path(GET protobuf_INCLUDE_DIR PARENT_PATH PROTOBUF_HOME)
-+ set(PROTOBUF_EXECUTABLE ${PROTOBUF_HOME}/bin/protoc)
-+elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB})
- else ()
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY})