cmake_modules/FindLua.cmake
changeset 3128 8702d3479d10
parent 3127 9ebdc21aba87
child 3134 430c1e96c80f
equal deleted inserted replaced
3127:9ebdc21aba87 3128:8702d3479d10
     8 		IF(APPLE)
     8 		IF(APPLE)
     9 			SET(LUA_DEFAULT lua)
     9 			SET(LUA_DEFAULT lua)
    10 		ELSE(APPLE)
    10 		ELSE(APPLE)
    11 			#locate the system's lua library
    11 			#locate the system's lua library
    12 			FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib)
    12 			FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib)
    13 			IF(${LUA_DEFAULT} EQUALS "LUA_DEFAULT-NOTFOUND")
    13 			IF(${LUA_DEFAULT} MATCHES "LUA_DEFAULT-NOTFOUND")
    14 				UNSET(LUA_DEFAULT)
    14 				UNSET(LUA_DEFAULT)
    15 				MESSAGE(FATAL_ERROR "Couldn't find Lua 5.1 library!")
    15 				MESSAGE(FATAL_ERROR "Couldn't find Lua 5.1 library!")
    16 			ENDIF()
    16 			ENDIF()
    17 			#remove the path (fpc doesn't like it - why?)
    17 			#remove the path (fpc doesn't like it - why?)
    18 			GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME)
    18 			GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME)