find lua.h ...
authorkoda
Tue, 20 Nov 2012 19:16:11 +0100
changeset 8075 0ccb218127c3
parent 8074 768427321cab
child 8076 5ee474476ae1
find lua.h ...
cmake_modules/FindLua.cmake
--- a/cmake_modules/FindLua.cmake	Tue Nov 20 18:51:42 2012 +0100
+++ b/cmake_modules/FindLua.cmake	Tue Nov 20 19:16:11 2012 +0100
@@ -21,12 +21,11 @@
             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_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/misc/liblua)
             ELSE()
                 set(LUA_FOUND true)
                 message(STATUS "LibLua 5.1 found at ${LUA_DEFAULT}")
+                find_path(LUA_INCLUDE_DIR lua.h)
                 #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)