Commits


Sutou Kouhei authored and Wes McKinney committed f5785216cb9
ARROW-7370: [C++] Fix old Protobuf with AUTO detection failure If old Protobuf is found, protobuf::libprotobuf CMake target is defined. The found old Protobuf isn't used and build vendored Protobuf. The build step tries creating protobuf::libprotobuf CMake target. But the target is already defined by the found old Protobuf. This change introduces ARROW_PROTOBUF_* variables and uses ${them} instead of raw protobuf::* targets to solve this problem. Error message: -- Could NOT find Protobuf: Found unsuitable version "3.6.1", but required is at least "3.7.0" (found /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread) Building Protocol Buffers from source CMake Error at cmake_modules/ThirdpartyToolchain.cmake:1179 (add_library): add_library cannot create imported target "protobuf::libprotobuf" because another target with the same name already exists. Call Stack (most recent call first): cmake_modules/ThirdpartyToolchain.cmake:147 (build_protobuf) cmake_modules/ThirdpartyToolchain.cmake:178 (build_dependency) cmake_modules/ThirdpartyToolchain.cmake:1204 (resolve_dependency_with_version) CMakeLists.txt:428 (include) Closes #6011 from kou/cpp-protobuf-fix-fallback-build-failure and squashes the following commits: 52fa7964a <Sutou Kouhei> Fix old Protobuf with AUTO detection failure Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Wes McKinney <wesm+git@apache.org>