-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
57 lines (47 loc) · 1.49 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 2.8.12...3.29)
set(HTTPFS_BASE_FOLDER "extension/httpfs")
project(HTTPFsExtension)
add_extension_definitions()
include_directories(extension/httpfs/include ${DUCKDB_MODULE_BASE_DIR}/third_party/httplib)
build_static_extension(
httpfs
extension/httpfs/hffs.cpp
extension/httpfs/s3fs.cpp
extension/httpfs/httpfs.cpp
extension/httpfs/http_state.cpp
extension/httpfs/crypto.cpp
extension/httpfs/create_secret_functions.cpp
extension/httpfs/httpfs_extension.cpp)
set(PARAMETERS "-warnings")
build_loadable_extension(
httpfs
${PARAMETERS}
extension/httpfs/httpfs
extension/httpfs/hffs.cpp
extension/httpfs/s3fs.cpp
extension/httpfs/httpfs.cpp
extension/httpfs/http_state.cpp
extension/httpfs/crypto.cpp
extension/httpfs/create_secret_functions.cpp
extension/httpfs/httpfs_extension.cpp)
if(MINGW)
set(OPENSSL_USE_STATIC_LIBS TRUE)
endif()
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
if(EMSCRIPTEN)
else()
target_link_libraries(httpfs_loadable_extension duckdb_mbedtls
${OPENSSL_LIBRARIES})
target_link_libraries(httpfs_extension duckdb_mbedtls ${OPENSSL_LIBRARIES})
if(MINGW)
find_package(ZLIB)
target_link_libraries(httpfs_loadable_extension ZLIB::ZLIB -lcrypt32)
target_link_libraries(httpfs_extension ZLIB::ZLIB -lcrypt32)
endif()
endif()
install(
TARGETS httpfs_extension
EXPORT "${DUCKDB_EXPORT_SET}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}")