aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/CMakeLists.txt')
-rw-r--r--src/lua/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lua/CMakeLists.txt b/src/lua/CMakeLists.txt
index 7ebd0de96..0c9d93621 100644
--- a/src/lua/CMakeLists.txt
+++ b/src/lua/CMakeLists.txt
@@ -14,7 +14,12 @@ SET(LUASRC lua_common.c
ADD_LIBRARY(rspamd-lua ${LINK_TYPE} ${LUASRC})
SET_TARGET_PROPERTIES(rspamd-lua PROPERTIES VERSION ${RSPAMD_VERSION})
-TARGET_LINK_LIBRARIES(rspamd-lua ${LUALIB})
+TARGET_LINK_LIBRARIES(rspamd-lua rspamd-util)
+IF(ENABLE_LUAJIT MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamd-lua "${LUAJIT_LIBRARY}")
+ELSE(ENABLE_LUAJIT MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamd-lua "${LUA_LIBRARY}")
+ENDIF(ENABLE_LUAJIT MATCHES "ON")
SET_TARGET_PROPERTIES(rspamd-lua PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB")
INSTALL(TARGETS rspamd-lua
LIBRARY DESTINATION ${LIBDIR}