aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/CMakeLists.txt
diff options
context:
space:
mode:
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")