12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- $OpenBSD: patch-cmake_FindLua_cmake,v 1.1.1.1 2016/01/23 19:15:13 landry Exp $
- Also detect the lua compiler: on openbsd, its not luac
- nor lua5Xc but luac5X
- --- cmake/FindLua.cmake.orig Sat Jan 23 17:24:05 2016
- +++ cmake/FindLua.cmake Sat Jan 23 17:28:06 2016
- @@ -34,6 +34,7 @@
- # Always search for non-versioned lua first (recommended)
- SET(_POSSIBLE_LUA_INCLUDE include include/lua)
- SET(_POSSIBLE_LUA_EXECUTABLE lua)
- +SET(_POSSIBLE_LUA_COMPILER luac)
- SET(_POSSIBLE_LUA_LIBRARY lua)
-
- # Determine possible naming suffixes (there is no standard for this)
- @@ -47,6 +48,7 @@ ENDIF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINO
- FOREACH(_SUFFIX ${_POSSIBLE_SUFFIXES})
- LIST(APPEND _POSSIBLE_LUA_INCLUDE "include/lua${_SUFFIX}")
- LIST(APPEND _POSSIBLE_LUA_EXECUTABLE "lua${_SUFFIX}")
- + LIST(APPEND _POSSIBLE_LUA_COMPILER "luac${_SUFFIX}")
- LIST(APPEND _POSSIBLE_LUA_LIBRARY "lua${_SUFFIX}")
- ENDFOREACH(_SUFFIX)
-
- @@ -55,6 +57,11 @@ FIND_PROGRAM(LUA_EXECUTABLE
- NAMES ${_POSSIBLE_LUA_EXECUTABLE}
- )
-
- +# Find the lua compiler
- +FIND_PROGRAM(LUA_COMPILER
- + NAMES ${_POSSIBLE_LUA_COMPILER}
- +)
- +
- # Find the lua header
- FIND_PATH(LUA_INCLUDE_DIR lua.h
- HINTS
- @@ -114,5 +121,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
- REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
- VERSION_VAR LUA_VERSION_STRING)
-
- -MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY LUA_EXECUTABLE)
- +MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY LUA_EXECUTABLE LUA_COMPILER)
-
|