summaryrefslogtreecommitdiffstats
path: root/libmariadb/plugins/compress/CMakeLists.txt
blob: f6dab85d3369f3dc94620dcd5aa85131adefcbfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SET(COMPRESS_PLUGIN_DIR ${CC_SOURCE_DIR}/plugins/compress)

INCLUDE_DIRECTORIES(${COMPRESS_PLUGIN_DIR})
INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/include)

#zlib compression

REGISTER_PLUGIN(TARGET zlib
                TYPE MARIADB_CLIENT_COMPRESSION_PLUGIN
                CONFIGURATIONS STATIC
                DEFAULT STATIC
                SOURCES ${COMPRESS_PLUGIN_DIR}/c_zlib.c)

#zstd compression
IF(${ZSTD_FOUND})
  INCLUDE_DIRECTORIES(${ZSTD_INCLUDE_DIRS})
  REGISTER_PLUGIN(TARGET zstd
                  TYPE MARIADB_CLIENT_COMPRESSION_PLUGIN
                  CONFIGURATIONS DYNAMIC STATIC OFF
                  DEFAULT DYNAMIC
                  SOURCES ${COMPRESS_PLUGIN_DIR}/c_zstd.c
                  LIBRARIES ${ZSTD_LIBRARIES})
ENDIF()