|
|
|
@ -5,16 +5,20 @@ set(BACKENDS "")
|
|
|
|
|
add_library("b_exec" MODULE "exec.c" "../strlcpy.c") |
|
|
|
|
list(APPEND BACKENDS "exec") |
|
|
|
|
|
|
|
|
|
find_library(REDIS_FOUND "hiredis") |
|
|
|
|
if (WITH_REDIS AND REDIS_FOUND) |
|
|
|
|
if (WITH_REDIS) |
|
|
|
|
pkg_check_modules(REDIS "hiredis" REQUIRED) |
|
|
|
|
add_library("b_redis" MODULE "redis.c" "../strlcpy.c") |
|
|
|
|
target_link_libraries("b_redis" "hiredis") |
|
|
|
|
list(APPEND BACKENDS "redis") |
|
|
|
|
endif () |
|
|
|
|
|
|
|
|
|
find_library(IPSET_FOUND "ipset") |
|
|
|
|
if (WITH_IPSET AND IPSET_FOUND) |
|
|
|
|
add_library("b_ipset" MODULE "ipset.c" "../strlcpy.c") |
|
|
|
|
if (WITH_IPSET) |
|
|
|
|
pkg_check_modules(IPSET "libipset" REQUIRED) |
|
|
|
|
if (IPSET_VERSION VERSION_LESS 7) |
|
|
|
|
add_library("b_ipset" MODULE "ipset6.c" "../strlcpy.c") |
|
|
|
|
else () |
|
|
|
|
message(SEND_ERROR "ipset version >= 7.X not supported yet") |
|
|
|
|
endif () |
|
|
|
|
target_link_libraries("b_ipset" "ipset") |
|
|
|
|
list(APPEND BACKENDS "ipset") |
|
|
|
|
endif () |
|
|
|
|