aboutsummaryrefslogtreecommitdiffstats
path: root/utils/CMakeLists.txt
blob: 672325924e8756a4151eedff623ed0f3d4f95a1e (plain)
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
SET(UTILSERVERSRC rspamd_http_server.c)
SET(UTILBENCHSRC rspamd_http_bench.c)

ADD_EXECUTABLE(rspamd-http-server ${UTILSERVERSRC})
SET_TARGET_PROPERTIES(rspamd-http-server PROPERTIES LINKER_LANGUAGE C)
TARGET_LINK_LIBRARIES(rspamd-http-server rspamd-server)
TARGET_LINK_LIBRARIES(rspamd-http-server rspamd-http-parser)
TARGET_LINK_LIBRARIES(rspamd-http-server ${RSPAMD_REQUIRED_LIBRARIES})

ADD_EXECUTABLE(rspamd-http-bench ${UTILBENCHSRC})
SET_TARGET_PROPERTIES(rspamd-http-bench PROPERTIES LINKER_LANGUAGE C)
TARGET_LINK_LIBRARIES(rspamd-http-bench rspamd-server)
TARGET_LINK_LIBRARIES(rspamd-http-bench rspamd-http-parser)
TARGET_LINK_LIBRARIES(rspamd-http-bench ${RSPAMD_REQUIRED_LIBRARIES})

IF (ENABLE_HYPERSCAN MATCHES "ON")
	SET_TARGET_PROPERTIES(rspamd-http-bench PROPERTIES LINKER_LANGUAGE CXX)
	SET_TARGET_PROPERTIES(rspamd-http-server PROPERTIES LINKER_LANGUAGE CXX)
ENDIF()

# Redirector
IF (ENABLE_REDIRECTOR MATCHES "ON")
    CONFIGURE_FILE(redirector.pl.in redirector.pl @ONLY)
    INSTALL(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/redirector.pl"
            DESTINATION bin RENAME rspamd-redirector)
ENDIF (ENABLE_REDIRECTOR MATCHES "ON")