Skip to content

Commit

Permalink
Minimize object library linking for s3
Browse files Browse the repository at this point in the history
  • Loading branch information
Shelnutt2 committed Jun 20, 2023
1 parent 48e5fff commit 409f552
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 41 deletions.
38 changes: 0 additions & 38 deletions tiledb/sm/filesystem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,6 @@ commence(object_library vfs)
s3.cc
s3_thread_pool_executor.cc
)
if(WIN32)
if(MSVC)
find_library(BCRYPT_LIBRARY bcrypt)
message(STATUS "Found Win32 lib bcrypt: ${BCRYPT_LIBRARY}")
this_target_link_libraries(${BCRYPT_LIBRARY})
else()
message(STATUS "Linking to Win32 lib bcrypt")
this_target_link_libraries(-lbcrypt)
endif()
else()
find_package(OpenSSL_EP REQUIRED)
this_target_link_libraries(INTERFACE OpenSSL::Crypto OpenSSL::SSL)
endif()
if (NOT WIN32)
find_package(Curl_EP REQUIRED)
target_link_libraries(s3_providers
INTERFACE
CURL::libcurl
)
endif()
endif()
this_target_sources(${VFS_SOURCES})
this_target_object_libraries(
Expand Down Expand Up @@ -100,24 +80,6 @@ commence(object_library vfs)
this_target_link_libraries(-lshlwapi)
endif()
endif()
# Add S3 dependencies
if (TILEDB_S3)
if (TILEDB_VCPKG)
find_package(AWSSDK_EP REQUIRED COMPONENTS s3)
target_link_libraries(vfs INTERFACE ${AWSSDK_LINK_LIBRARIES})
else()
find_package(AWSSDK_EP REQUIRED COMPONENTS s3)
target_link_libraries(vfs INTERFACE
AWSSDK::aws-cpp-sdk-s3
AWSSDK::aws-cpp-sdk-core
AWSSDK::aws-c-event-stream
AWSSDK::aws-checksums
AWSSDK::aws-c-common
AWSSDK::aws-cpp-sdk-identity-management
AWSSDK::aws-cpp-sdk-sts
)
endif()
endif()
conclude(object_library)

add_test_subdirectory()
6 changes: 3 additions & 3 deletions tiledb/sm/filesystem/s3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ commence(object_library s3_providers)
else()
find_package(OpenSSL_EP REQUIRED)
this_target_link_libraries(INTERFACE OpenSSL::Crypto OpenSSL::SSL)
endif()
if (NOT WIN32)

# Add curl
find_package(Curl_EP REQUIRED)
target_link_libraries(s3_providers
this_target_link_libraries(
INTERFACE
CURL::libcurl
)
Expand Down

0 comments on commit 409f552

Please sign in to comment.