Skip to content

Commit 2c53f03

Browse files
committedMay 30, 2021
Remove unused version detection from FindLuaJIT.cmake
1 parent 758e3aa commit 2c53f03

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed
 

‎cmake/Modules/FindLuaJIT.cmake

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Locate LuaJIT library
22
# This module defines
33
# LUAJIT_FOUND, if false, do not try to link to Lua
4+
# LUA_LIBRARY, where to find the lua library
45
# LUA_INCLUDE_DIR, where to find lua.h
5-
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
66
#
77
# This module is similar to FindLua51.cmake except that it finds LuaJit instead.
88

@@ -44,19 +44,10 @@ else()
4444
)
4545
endif()
4646

47-
48-
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
49-
FILE(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT .+\"")
50-
51-
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
52-
UNSET(lua_version_str)
53-
ENDIF()
54-
5547
INCLUDE(FindPackageHandleStandardArgs)
5648
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
57-
# all listed variables are TRUE
49+
# all listed variables exist
5850
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
59-
REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR
60-
VERSION_VAR LUA_VERSION_STRING)
51+
REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR)
6152

62-
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
53+
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARY)

0 commit comments

Comments
 (0)
Please sign in to comment.