diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-12 13:24:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-12 13:24:03 +0100 |
commit | fec2e1314d431e9c965529abdfe7b1d5e66e450f (patch) | |
tree | aec4306139ba25928e1eeccfb261d90562695d04 /CMakeLists.txt | |
parent | 22e402a81372f328a72f1596efdc7c52571171bb (diff) | |
download | rspamd-fec2e1314d431e9c965529abdfe7b1d5e66e450f.tar.gz rspamd-fec2e1314d431e9c965529abdfe7b1d5e66e450f.zip |
More fixes to luajit detection.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c0d0301b..e17ed3a2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,23 +127,26 @@ INCLUDE(FindOpenSSL) # Find lua installation MACRO(FindLua _major _minor) # Find lua libraries - MESSAGE(STATUS "Check for lua ${_major}.${_minor}") - UNSET(LUA_INCLUDE_DIR CACHE) - UNSET(LUA_LIBRARY CACHE) - - FIND_PATH(LUA_INCLUDE_DIR lua.h - HINTS - "${RSPAMD_SEARCH_PATH}" - $ENV{LUA_DIR} - PATH_SUFFIXES "include/lua${_major}${_minor}" - "include/lua${_major}.${_minor}" - "include/lua-${_major}.${_minor}" - include/lua include - PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS} - ) + UNSET(LUA_LIBRARY CACHE) IF(ENABLE_LUAJIT MATCHES "ON") + MESSAGE(STATUS "Check for luajit ${_major}.${_minor}") + FIND_PATH(LUA_INCLUDE_DIR lua.h + HINTS + "${RSPAMD_SEARCH_PATH}" + $ENV{LUA_DIR} + PATH_SUFFIXES "include/luajit-2.0" + "include/luajit${_major}${_minor}" + "include/luajit${_major}.${_minor}" + "include/luajit-${_major}.${_minor}" + "include/luajit" + "include/lua${_major}${_minor}" + "include/lua${_major}.${_minor}" + "include/lua-${_major}.${_minor}" + include/lua include + PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS} + ) FIND_LIBRARY(LUA_LIBRARY NAMES luajit "luajit-2.0" @@ -159,6 +162,17 @@ MACRO(FindLua _major _minor) DOC "Lua library" ) ELSE(ENABLE_LUAJIT MATCHES "ON") + MESSAGE(STATUS "Check for lua ${_major}.${_minor}") + FIND_PATH(LUA_INCLUDE_DIR lua.h + HINTS + "${RSPAMD_SEARCH_PATH}" + $ENV{LUA_DIR} + PATH_SUFFIXES "include/lua${_major}${_minor}" + "include/lua${_major}.${_minor}" + "include/lua-${_major}.${_minor}" + include/lua include + PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS} + ) FIND_LIBRARY(LUA_LIBRARY NAMES lua "lua${_major}${_minor}" |