COMMENT "Create source distribution"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-ADD_CUSTOM_TARGET(check DEPENDS rspamd-test)
-ADD_CUSTOM_TARGET(run-test DEPENDS check COMMAND test/rspamd-test)
\ No newline at end of file
+IF(NOT DEBIAN_BUILD)
+ ADD_CUSTOM_TARGET(check DEPENDS rspamd-test)
+ ADD_CUSTOM_TARGET(run-test DEPENDS check COMMAND test/rspamd-test)
+ENDIF(NOT DEBIAN_BUILD)
\ No newline at end of file
SET_TARGET_PROPERTIES(rspamd-test PROPERTIES LINKER_LANGUAGE C)
SET_TARGET_PROPERTIES(rspamd-test PROPERTIES COMPILE_FLAGS "-DRSPAMD_TEST")
-TARGET_LINK_LIBRARIES(rspamd-test event)
-TARGET_LINK_LIBRARIES(rspamd-test m)
-TARGET_LINK_LIBRARIES(rspamd-test ${GLIB2_LIBRARIES})
-TARGET_LINK_LIBRARIES(rspamd-test ${CMAKE_REQUIRED_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd-test rspamd-mime)
TARGET_LINK_LIBRARIES(rspamd-test rspamd-server)
TARGET_LINK_LIBRARIES(rspamd-test rspamd-util)
-TARGET_LINK_LIBRARIES(rspamd-test hiredis)
+TARGET_LINK_LIBRARIES(rspamd-test rspamd-lua)
+
+TARGET_LINK_LIBRARIES(rspamd-test event)
IF(HAVE_LIBEVENT2)
TARGET_LINK_LIBRARIES(rspamd-test event_pthreads)
ENDIF(HAVE_LIBEVENT2)
-INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/src")
-IF(GMIME2_FOUND)
- TARGET_LINK_LIBRARIES(rspamd-test ${GMIME2_LIBRARIES})
-ELSE(GMIME2_FOUND)
- TARGET_LINK_LIBRARIES(rspamd-test ${GMIME24_LIBRARIES})
-ENDIF(GMIME2_FOUND)
-IF(ENABLE_STATIC MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamd-test ${PCRE_LIBRARIES})
-ENDIF(ENABLE_STATIC MATCHES "ON")
-IF(ENABLE_LUAJIT MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamd-test "${LUAJIT_LIBRARY}")
-ELSE(ENABLE_LUAJIT MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamd-test "${LUA_LIBRARY}")
-ENDIF(ENABLE_LUAJIT MATCHES "ON")
+IF(WITH_DB)
+ TARGET_LINK_LIBRARIES(rspamd-test db)
+ENDIF(WITH_DB)
+
IF(OPENSSL_FOUND)
TARGET_LINK_LIBRARIES(rspamd-test ${OPENSSL_LIBRARIES})
ENDIF(OPENSSL_FOUND)
+IF(HAVE_FETCH_H)
+ TARGET_LINK_LIBRARIES(rspamd-test fetch)
+ENDIF(HAVE_FETCH_H)
+TARGET_LINK_LIBRARIES(rspamd-test ${RSPAMD_REQUIRED_LIBRARIES})
+
+IF(ENABLE_LUAJIT MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamd-test "${LUAJIT_LIBRARY}")
+ELSE(ENABLE_LUAJIT MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamd-test "${LUA_LIBRARY}")
+ENDIF(ENABLE_LUAJIT MATCHES "ON")
+
IF(ENABLE_GPERF_TOOLS MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd-test profiler)
-ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON")
\ No newline at end of file
+ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON")
+TARGET_LINK_LIBRARIES(rspamd-test hiredis)
+IF(GLIB_COMPAT)
+ TARGET_LINK_LIBRARIES(rspamd-test glibadditions)
+ENDIF(GLIB_COMPAT)
\ No newline at end of file