--- a/cmake_modules/FindLua.cmake Tue Nov 20 00:47:35 2012 +0400
+++ b/cmake_modules/FindLua.cmake Tue Nov 20 17:50:17 2012 +0100
@@ -6,6 +6,7 @@
# the bundled one when nothing is found
set(LUA_FOUND false)
+set(LUA_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/misc/liblua)
if (ANDROID)
SET(LUA_DEFAULT "liblua5.1.so")
@@ -19,11 +20,13 @@
#locate the system's lua library
FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib)
IF(${LUA_DEFAULT} MATCHES "LUA_DEFAULT-NOTFOUND")
- set(LUA_DEFAULT lua)
+ set(LUA_DEFAULT lua)
+ set(LUA_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/misc/liblua)
ELSE()
set(LUA_FOUND true)
message(STATUS "LibLua 5.1 found at ${LUA_DEFAULT}")
#remove the path (fpc doesn't like it - why?)
+ GET_FILENAME_COMPONENT(LUA_INCLUDE_DIR ${LUA_DEFAULT} PATH)
GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME)
ENDIF()
ENDIF(APPLE)
@@ -32,3 +35,4 @@
SET(LUA_LIBRARY ${LUA_DEFAULT} CACHE STRING "Lua library to link to; file name without path only!")
+