SET(STATSHOWSRC statshow.c) FOREACH(_rs ${CLASSIFIERSSRC} ${TOKENIZERSSRC}) LIST(APPEND STATSHOWSRC "../../${_rs}") ENDFOREACH(_rs) ADD_EXECUTABLE(statshow EXCLUDE_FROM_ALL ${STATSHOWSRC}) SET_TARGET_PROPERTIES(statshow PROPERTIES LINKER_LANGUAGE C) SET_TARGET_PROPERTIES(statshow PROPERTIES COMPILE_FLAGS "-I../../src -DRSPAMD_MAIN") TARGET_LINK_LIBRARIES(statshow rspamd_lua) TARGET_LINK_LIBRARIES(statshow rspamdserver) TARGET_LINK_LIBRARIES(statshow event) IF(ENABLE_LUAJIT MATCHES "ON") TARGET_LINK_LIBRARIES(statshow "${LUAJIT_LIBRARY}") ELSE(ENABLE_LUAJIT MATCHES "ON") TARGET_LINK_LIBRARIES(statshow "${LUA_LIBRARY}") ENDIF(ENABLE_LUAJIT MATCHES "ON") TARGET_LINK_LIBRARIES(statshow ${GLIB2_LIBRARIES}) TARGET_LINK_LIBRARIES(statshow ${CMAKE_REQUIRED_LIBRARIES}) IF(GMIME24) TARGET_LINK_LIBRARIES(statshow ${GMIME24_LIBRARIES}) ELSE(GMIME24) TARGET_LINK_LIBRARIES(statshow ${GMIME2_LIBRARIES}) ENDIF(GMIME24) IF(ENABLE_STATIC MATCHES "ON") TARGET_LINK_LIBRARIES(statshow ${PCRE_LIBRARIES}) ENDIF(ENABLE_STATIC MATCHES "ON")