summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-05-25 21:16:55 +0200
committersfan5 <sfan5@live.de>2021-05-30 11:40:14 +0200
commit2c53f03c184b79d8f8774cb05edd288a7d337bef (patch)
tree6f74369877f3577a938f5b0463ff36d6d075970d /cmake
parent758e3aa1ca541c99e8c7824a2465b3bda7394d20 (diff)
downloadminetest-2c53f03c184b79d8f8774cb05edd288a7d337bef.tar.gz
minetest-2c53f03c184b79d8f8774cb05edd288a7d337bef.tar.bz2
minetest-2c53f03c184b79d8f8774cb05edd288a7d337bef.zip
Remove unused version detection from FindLuaJIT.cmake
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindLuaJIT.cmake17
1 files changed, 4 insertions, 13 deletions
diff --git a/cmake/Modules/FindLuaJIT.cmake b/cmake/Modules/FindLuaJIT.cmake
index 97b0b7c64..217415d14 100644
--- a/cmake/Modules/FindLuaJIT.cmake
+++ b/cmake/Modules/FindLuaJIT.cmake
@@ -1,8 +1,8 @@
# Locate LuaJIT library
# This module defines
# LUAJIT_FOUND, if false, do not try to link to Lua
+# LUA_LIBRARY, where to find the lua library
# LUA_INCLUDE_DIR, where to find lua.h
-# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
#
# This module is similar to FindLua51.cmake except that it finds LuaJit instead.
@@ -44,19 +44,10 @@ else()
)
endif()
-
-IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
- FILE(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT .+\"")
-
- STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
- UNSET(lua_version_str)
-ENDIF()
-
INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
-# all listed variables are TRUE
+# all listed variables exist
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
- REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR
- VERSION_VAR LUA_VERSION_STRING)
+ REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR)
-MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
+MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARY)