cmake_modules/FindLua.cmake
changeset 3145 a9af6bf223cf
parent 3134 430c1e96c80f
child 6812 929b467c7277
equal deleted inserted replaced
3144:f1ba655a6941 3145:a9af6bf223cf
     8 		SET(LUA_DEFAULT lua)
     8 		SET(LUA_DEFAULT lua)
     9 	ELSE(APPLE)
     9 	ELSE(APPLE)
    10 		#locate the system's lua library
    10 		#locate the system's lua library
    11 		FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib)
    11 		FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib)
    12 		IF(${LUA_DEFAULT} MATCHES "LUA_DEFAULT-NOTFOUND")
    12 		IF(${LUA_DEFAULT} MATCHES "LUA_DEFAULT-NOTFOUND")
    13 			UNSET(LUA_DEFAULT)
    13 			#UNSET(LUA_DEFAULT)
    14 			MESSAGE(FATAL_ERROR "Couldn't find Lua 5.1 library!")
    14 			MESSAGE(FATAL_ERROR "Couldn't find Lua 5.1 library!")
    15 		ENDIF()
    15 		ENDIF()
    16 		#remove the path (fpc doesn't like it - why?)
    16 		#remove the path (fpc doesn't like it - why?)
    17 		GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME)
    17 		GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME)
    18 	ENDIF(APPLE)
    18 	ENDIF(APPLE)
    19 ENDIF(WIN32)
    19 ENDIF(WIN32)
    20 SET(LUA_LIBRARY ${LUA_DEFAULT} CACHE STRING "Lua library to link to; file name without path only!")
    20 SET(LUA_LIBRARY ${LUA_DEFAULT} CACHE STRING "Lua library to link to; file name without path only!")
    21 UNSET(LUA_DEFAULT)
    21 #UNSET(LUA_DEFAULT)