generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
74 lines (59 loc) · 2.02 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.5)
# Set extension name here
set(TARGET_NAME airport)
set(EXTENSION_NAME ${TARGET_NAME}_extension)
set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension)
find_package(Arrow REQUIRED)
find_package(ArrowFlight REQUIRED)
find_package(CURL REQUIRED)
project(${TARGET_NAME})
include_directories(src/include)
set(EXTENSION_SOURCES
src/airport_exception.cpp
src/airport_extension.cpp
src/airport_flight_stream.cpp
src/airport_json_common.cpp
src/airport_json_serializer.cpp
src/airport_list_flights.cpp
src/airport_secrets.cpp
src/airport_take_flight.cpp
src/storage/airport_catalog_api.cpp
src/storage/airport_catalog_set.cpp
src/storage/airport_catalog.cpp
src/storage/airport_clear_cache.cpp
src/storage/airport_schema_entry.cpp
src/storage/airport_schema_set.cpp
src/storage/airport_table_entry.cpp
src/storage/airport_table_set.cpp
src/storage/airport_transaction_manager.cpp
src/storage/airport_transaction.cpp
src/storage/airport_curl_pool.cpp
src/airport_headers.cpp
src/storage/airport_exchange.cpp
src/storage/airport_delete.cpp
src/storage/airport_insert.cpp
src/storage/airport_update.cpp
)
build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES})
#target_link_libraries(${EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
#target_link_libraries(${LOADABLE_EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
target_link_libraries(${EXTENSION_NAME}
Arrow::arrow_static
ArrowFlight::arrow_flight_static
gRPC::grpc++
CURL::libcurl
OpenSSL::SSL
OpenSSL::Crypto
)
#target_link_libraries(${LOADABLE_TARGET_NAME} PRIVATE Arrow::arrow_shared ArrowFlight::arrow_flight_shared CURL::libcurl OpenSSL::SSL OpenSSL::Crypto)
build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES})
target_link_libraries(${LOADABLE_EXTENSION_NAME}
Arrow::arrow_static
ArrowFlight::arrow_flight_static
gRPC::grpc++
)
install(
TARGETS ${EXTENSION_NAME}
EXPORT "${DUCKDB_EXPORT_SET}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}")