From 1fd435e5d4fc3c51fae8a1a184b347bdf6039d26 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 10 May 2011 19:15:03 +0400 Subject: * Rework build process: - add librspamdserver - link this library to all daemons and utils of rspamd - use subdirectories more often * Rework global variables logic - move them to the main process * Fix logging to handle utf-8 correctly * Add statshow utility and make it working * Move printf functions to separate source file --- utils/statshow/CMakeLists.txt | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'utils/statshow/CMakeLists.txt') diff --git a/utils/statshow/CMakeLists.txt b/utils/statshow/CMakeLists.txt index 12de6038e..2e28d019e 100644 --- a/utils/statshow/CMakeLists.txt +++ b/utils/statshow/CMakeLists.txt @@ -1,9 +1,21 @@ SET(STATSHOWSRC statshow.c) -ADD_EXECUTABLE(statshow EXCLUDE_FROM_ALL ${CLASSIFIERSSRC} ${TOKENIZERSSRC} ${STATSHOWSRC}) +FOREACH(_rs ${CLASSIFIERSSRC} ${TOKENIZERSSRC}) + LIST(APPEND STATSHOWSRC "../../${_rs}") + MESSAGE("${_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") +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(GMIME2_FOUND) @@ -11,12 +23,6 @@ IF(GMIME2_FOUND) ELSE(GMIME2_FOUND) TARGET_LINK_LIBRARIES(statshow ${GMIME24_LIBRARIES}) ENDIF(GMIME2_FOUND) -TARGET_LINK_LIBRARIES(statshow rspamd_lua) -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") IF(ENABLE_STATIC MATCHES "ON") TARGET_LINK_LIBRARIES(statshow ${PCRE_LIBRARIES}) ENDIF(ENABLE_STATIC MATCHES "ON") \ No newline at end of file -- cgit v1.2.3