Skip to content

Commit

Permalink
[GLUTEN-7886][VL] Fix broken Ubuntu 20.04 + VCPKG + GCS + ABFS build
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer authored Nov 12, 2024
1 parent 36a5d18 commit fca7d8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ if(CCACHE_FOUND)
endif(CCACHE_FOUND)

macro(find_protobuf)
set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
find_package(Protobuf)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
if("${Protobuf_LIBRARY}" STREQUAL "Protobuf_LIBRARY-NOTFOUND")
message(FATAL_ERROR "Protobuf Library Not Found")
endif()
Expand Down
6 changes: 6 additions & 0 deletions cpp/velox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,27 @@ macro(find_re2)
endmacro()

macro(find_awssdk)
set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
find_package(AWSSDK REQUIRED COMPONENTS s3;identity-management)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
endmacro()

macro(find_gcssdk)
set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
find_package(google_cloud_cpp_storage REQUIRED)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
endmacro()

macro(find_azure)
find_package(CURL REQUIRED)
find_package(LibXml2 REQUIRED)
set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
find_package(azure-storage-blobs-cpp CONFIG REQUIRED)
find_package(azure-storage-files-datalake-cpp CONFIG REQUIRED)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
endmacro()

# Build Velox backend.
Expand Down

0 comments on commit fca7d8c

Please sign in to comment.