summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2015-03-19 14:34:17 +0200
committerAndrew Lewis <nerf@judo.za.org>2015-03-19 14:35:49 +0200
commit5a419ac94fea0f752ef97de4d0ec8378f633ef4e (patch)
tree52363f82fed7c6725dc758838e7430ff62d2a7d2 /CMakeLists.txt
parent6a5407046c246abf624dc8f663344866bced2bc4 (diff)
downloadrspamd-5a419ac94fea0f752ef97de4d0ec8378f633ef4e.tar.gz
rspamd-5a419ac94fea0f752ef97de4d0ec8378f633ef4e.zip
Fix luajit/lua headers confusion
Conflicts: CMakeLists.txt
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt59
1 files changed, 39 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04dc2f3f9..5f2c81090 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,26 +127,45 @@ MACRO(FindLua _major _minor)
MESSAGE(STATUS "Check for lua ${_major}.${_minor}")
UNSET(LUA_INCLUDE_DIR CACHE)
- UNSET(LUA_LIBRARY CACHE)
- FIND_PATH(LUA_INCLUDE_DIR lua.h
- HINTS
- $ENV{LUA_DIR}
- PATH_SUFFIXES "include/luajit-2.0"
- "include/lua${_major}${_minor}"
- "include/lua${_major}.${_minor}"
- "include/lua-${_major}.${_minor}"
- include/lua include
- PATHS
- /usr/local
- /usr/pkg
- /usr
- ~/Library/Frameworks
- /Library/Frameworks
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
- )
+ UNSET(LUA_LIBRARY CACHE)
+
+ IF(ENABLE_LUAJIT MATCHES "ON")
+ FIND_PATH(LUA_INCLUDE_DIR lua.h
+ HINTS
+ $ENV{LUA_DIR}
+ PATH_SUFFIXES "include/luajit-2.0"
+ PATHS
+ /usr/local
+ /usr/pkg
+ /usr
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+ )
+ ELSE(ENABLE_LUAJIT MATCHES "ON")
+ FIND_PATH(LUA_INCLUDE_DIR lua.h
+ HINTS
+ $ENV{LUA_DIR}
+ PATH_SUFFIXES "include/lua${_major}${_minor}"
+ "include/lua${_major}${_minor}"
+ "include/lua${_major}.${_minor}"
+ "include/lua-${_major}.${_minor}"
+ include/lua include
+ PATHS
+ /usr/local
+ /usr/pkg
+ /usr
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+ )
+ ENDIF(ENABLE_LUAJIT MATCHES "ON")
# Check for luajit
IF(ENABLE_LUAJIT MATCHES "ON")