-
Notifications
You must be signed in to change notification settings - Fork 43
/
CMakeLists.txt
executable file
·55 lines (40 loc) · 1.46 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
cmake_minimum_required(VERSION 3.16)
set(CMAKE_CXX_STANDARD 14)
# Set extension name here
set(TARGET_NAME pixels)
set(DCMAKE_EXPORT_COMPILE_COMMANDS=1)
set(EXTENSION_NAME ${TARGET_NAME}_extension)
project(${TARGET_NAME})
include_directories(include)
set(ENV{PIXELS_SRC} ${CMAKE_CURRENT_SOURCE_DIR})
set(ENV{PIXELS_HOME} ${CMAKE_CURRENT_SOURCE_DIR})
set(EXTENSION_SOURCES
pixels_extension.cpp
PixelsScanFunction.cpp
)
add_library(${EXTENSION_NAME} STATIC ${EXTENSION_SOURCES})
find_package(Protobuf REQUIRED)
include_directories(${Protobuf_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(pixels-common)
add_subdirectory(pixels-core)
add_subdirectory(pixels-cli)
add_subdirectory(tests)
include_directories(pixels-common/include)
include_directories(pixels-core/include)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/pixels-common/liburing/src/include)
target_link_libraries(
${EXTENSION_NAME}
pixels-common
pixels-core
)
# Add the subdirectory that contains the build_loadable_extension definition
set(PARAMETERS "-warnings")
build_loadable_extension(${TARGET_NAME} ${PARAMETERS} ${EXTENSION_SOURCES})
message("duckdb export set: ${DUCKDB_EXPORT_SET}" )
install(
TARGETS ${EXTENSION_NAME} pixels-core pixels-common
EXPORT "${DUCKDB_EXPORT_SET}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}")