diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-02-01 22:01:19 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-02-01 22:01:19 +0300 |
commit | 295619fdc102e5528a5370a0dcd58bef9c7dc371 (patch) | |
tree | da48d33f1cb9648f91dd399863dc6ff6bca67c65 /CMakeLists.txt | |
parent | 2a383446ab6254777693544e5acda2a805947f81 (diff) | |
download | rspamd-295619fdc102e5528a5370a0dcd58bef9c7dc371.tar.gz rspamd-295619fdc102e5528a5370a0dcd58bef9c7dc371.zip |
* Implement controller interface inside librspamdclient/rspamc
* REMOVE perl client (at last)
Fixed some stupid moments in a controller's protocol
Change version to 0.3.5
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c47ccec36..3d01c636a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT(rspamd C) SET(RSPAMD_VERSION_MAJOR 0) SET(RSPAMD_VERSION_MINOR 3) -SET(RSPAMD_VERSION_PATCH 4) +SET(RSPAMD_VERSION_PATCH 5) SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}.${RSPAMD_VERSION_PATCH}") @@ -19,6 +19,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR) OPTION(DEBUG_MODE "Enable debug output [default: ON]" ON) OPTION(ENABLE_OPTIMIZATION "Enable optimization [default: OFF]" OFF) +OPTION(ENABLE_PERL "Enable perl client API [default: OFF]" OFF) OPTION(SKIP_RELINK_RPATH "Skip relinking and full RPATH for the install tree" OFF) OPTION(ENABLE_REDIRECTOR "Enable redirector install [default: OFF]" OFF) OPTION(ENABLE_PROFILING "Enable profiling [default: OFF]" OFF) @@ -579,9 +580,6 @@ SET(RSPAMDSRC src/modules.c src/view.c src/worker.c) -IF(ENABLE_PERL MATCHES "ON") - LIST(APPEND RSPAMDSRC src/perl.c) -ENDIF(ENABLE_PERL MATCHES "ON") ADD_SUBDIRECTORY(src/lua) ADD_SUBDIRECTORY(lib) ADD_SUBDIRECTORY(src/client) @@ -652,7 +650,7 @@ ADD_CUSTOM_COMMAND(OUTPUT src/modules.c COMMAND ../utils/gen-modules.sh ${PLUGINSSRC} WORKING_DIRECTORY src) -IF(PERL_EXECUTABLE) +IF(ENABLE_PERL MATCHES "ON") ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_SOURCE_DIR}/perl/Makefile DEPENDS ${CMAKE_SOURCE_DIR}/perl/Makefile.PL COMMAND ${PERL_EXECUTABLE} ./Makefile.PL DESTDIR=${DESTDIR} PREFIX=${PREFIX} INSTALLMAN3DIR=${MAN_PREFIX}/man3 @@ -664,11 +662,10 @@ IF(PERL_EXECUTABLE) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/perl VERBATIM) -ENDIF(PERL_EXECUTABLE) +ENDIF(ENABLE_PERL MATCHES "ON") CONFIGURE_FILE(config.h.in src/config.h) CONFIGURE_FILE(contrib/exim/local_scan.c.in contrib/exim/local_scan_rspamd.c @ONLY) -CONFIGURE_FILE(rspamc.pl.in rspamc.pl @ONLY) CONFIGURE_FILE(rspamd.xml.sample conf/rspamd.xml.sample @ONLY) ######################### LINK SECTION ############################### @@ -687,9 +684,9 @@ IF(ENABLE_PERL MATCHES "ON") ENDIF(PERL_DYNALOADER) ENDIF(ENABLE_PERL MATCHES "ON") -IF(PERL_EXECUTABLE) +IF(ENABLE_PERL MATCHES "ON") ADD_DEPENDENCIES(rspamd perlmodule) -ENDIF(PERL_EXECUTABLE) +ENDIF(ENABLE_PERL MATCHES "ON") TARGET_LINK_LIBRARIES(rspamd rspamd_lua) TARGET_LINK_LIBRARIES(rspamd "${LUA_LIBRARY}") @@ -763,9 +760,7 @@ ENDIF(ENABLE_STATIC MATCHES "ON") # Binaries INSTALL(PROGRAMS rspamd-${RSPAMD_VERSION} DESTINATION bin RENAME rspamd) -IF(PERL_EXECUTABLE) - INSTALL(PROGRAMS rspamc.pl DESTINATION bin RENAME rspamc) -ENDIF(PERL_EXECUTABLE) +INSTALL(PROGRAMS src/client/rspamc DESTINATION bin) # Configs @@ -812,14 +807,14 @@ FOREACH(LUA_CONF ${LUA_CONFIGS}) ENDFOREACH(LUA_CONF) # Perl lib -IF(PERL_EXECUTABLE) +IF(ENABLE_PERL MATCHES "ON") INSTALL(CODE "EXECUTE_PROCESS(COMMAND make install WORKING_DIRECTORY perl)") -ENDIF(PERL_EXECUTABLE) +ENDIF(ENABLE_PERL MATCHES "ON") # Redirector -IF(ENABLE_REDIRECTOR MATCHES "ON" AND PERL_EXECUTABLE) +IF(ENABLE_REDIRECTOR MATCHES "ON" AND ENABLE_PERL MATCHES "ON") INSTALL(PROGRAMS utils/redirector.pl DESTINATION bin RENAME rspamd-redirector) -ENDIF(ENABLE_REDIRECTOR MATCHES "ON" AND PERL_EXECUTABLE) +ENDIF(ENABLE_REDIRECTOR MATCHES "ON" AND ENABLE_PERL MATCHES "ON") # Start scripts IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT BUILD_PORT) |