diff options
Diffstat (limited to 'utils/statshow/CMakeLists.txt')
-rw-r--r-- | utils/statshow/CMakeLists.txt | 22 |
1 files changed, 14 insertions, 8 deletions
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 |