aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-16 15:28:40 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-16 15:28:40 +0000
commitb5597411a2a4f9b46c0076ccddb95f8eacc1cb7f (patch)
treea647a4306708df37a3ea1d97666fd2d325e24464 /src/libstat/CMakeLists.txt
parentffd95d7c71307bb9540f07bbaac3b04859226837 (diff)
downloadrspamd-b5597411a2a4f9b46c0076ccddb95f8eacc1cb7f.tar.gz
rspamd-b5597411a2a4f9b46c0076ccddb95f8eacc1cb7f.zip
Reorganize statfiles and classifiers into libstat.
Diffstat (limited to 'src/libstat/CMakeLists.txt')
-rw-r--r--src/libstat/CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libstat/CMakeLists.txt b/src/libstat/CMakeLists.txt
new file mode 100644
index 000000000..6254a41a6
--- /dev/null
+++ b/src/libstat/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Librspamdserver
+SET(LIBSTATSRC
+ )
+SET(TOKENIZERSSRC tokenizers/tokenizers.c
+ tokenizers/osb.c)
+
+SET(CLASSIFIERSSRC classifiers/classifiers.c
+ classifiers/bayes.c
+ classifiers/winnow.c)
+
+ADD_LIBRARY(rspamd-stat ${LINK_TYPE} ${LIBSTATSRC} ${TOKENIZERSSRC} ${CLASSIFIERSSRC})
+IF(NOT DEBIAN_BUILD)
+ SET_TARGET_PROPERTIES(rspamd-stat PROPERTIES VERSION ${RSPAMD_VERSION})
+ENDIF(NOT DEBIAN_BUILD)
+SET_TARGET_PROPERTIES(rspamd-stat PROPERTIES LINKER_LANGUAGE C COMPILE_FLAGS "-DRSPAMD_LIB")
+TARGET_LINK_LIBRARIES(rspamd-stat rspamd-server)
+
+IF(CMAKE_COMPILER_IS_GNUCC)
+SET_TARGET_PROPERTIES(rspamd-stat PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB -fno-strict-aliasing")
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+
+
+IF(NO_SHARED MATCHES "OFF")
+ INSTALL(TARGETS rspamd-stat
+ LIBRARY DESTINATION ${LIBDIR}
+ PUBLIC_HEADER DESTINATION ${INCLUDEDIR})
+ENDIF(NO_SHARED MATCHES "OFF")