Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/script/cmake/FindLua.cmake @ 946

Last change on this file since 946 was 946, checked in by bknecht, 16 years ago

trying to link lua into the project and start with creating an interface to lua. still does not compile. stupid cmake

File size: 1.1 KB
Line 
1# Find Lua includes and library
2#
3# This module defines
4#  Lua_INCLUDE_DIR
5#  Lua_LIBRARIES, the libraries to link against to use Lua.
6#  Lua_LIB_DIR, the location of the libraries
7#  Lua_FOUND, If false, do not try to use Lua
8#
9# Copyright © 2007, Matt Williams
10#
11# Redistribution and use is allowed according to the terms of the BSD license.
12
13IF (Lua_LIBRARIES AND Lua_INCLUDE_DIR)
14    SET(Lua_FIND_QUIETLY TRUE) # Already in cache, be silent
15ENDIF (Lua_LIBRARIES AND Lua_INCLUDE_DIR)
16
17FIND_PATH(Lua_INCLUDE_DIR lua.h
18        /usr/include/lua5.1
19        /usr/local/include/lua5.1)
20
21FIND_PATH(Lua_INCLUDE_DIR lauxlib.h
22        /usr/include/lua5.1
23        /usr/local/include/lua5.1)
24
25FIND_PATH(Lua_INCLUDE_DIR lualib.h
26        /usr/include/lua5.1
27        /usr/local/include/lua5.1)
28
29FIND_LIBRARY(Lua_LIBRARIES lua5.1 PATH
30        /usr/lib
31        /usr/local/lib)
32
33
34IF (Lua_INCLUDE_DIR AND Lua_LIBRARIES)
35    SET(Lua_FOUND TRUE)
36ENDIF (Lua_INCLUDE_DIR AND Lua_LIBRARIES)
37
38IF (Lua_FOUND)
39    MESSAGE(STATUS "Found Lua: ${Lua_LIBRARIES}")
40ELSE (Lua_FOUND)
41    IF (Lua_FIND_REQUIRED)
42        MESSAGE(FATAL_ERROR "Could not find Lua")
43    ENDIF (Lua_FIND_REQUIRED)
44ENDIF (Lua_FOUND)
Note: See TracBrowser for help on using the repository browser.