blob: 5228bb3597ffe12c920858cbd42815b4e96d2bf7 (
plain)
ofs | hex dump | ascii |
---|
0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 04 00 00 00 04 00 08 06 00 00 00 7f 1d 2b | .PNG........IHDR...............+ |
0020 | 83 00 00 00 06 62 4b 47 44 00 ff 00 ff 00 ff a0 bd a7 93 00 00 00 09 70 48 59 73 00 00 0b 13 00 | .....bKGD..............pHYs..... |
0040 | 00 0b 13 01 00 9a 9c 18 00 00 00 07 74 49 4d 45 07 e0 09 0d 0e 32 2d 87 db 2e 80 00 00 16 89 49 | ............tIME.....2-........I |
0060 | 44 41 54 78 da ed dd 41 6d c4 30 10 86 d1 b6 32 80 20 98 c3 c2 08 05 63 59 34 8b a5 81 10 18 3d | DATx...Am.0....2.......cY4.....= |
0080 | 18 41 18 6c 2f d5 aa c7 46 72 b7 e3 fa 3d 04 d6 7f fc 34 4a 5e 6b ad f7 17 00 00 00 e0 5f 7b 33 | .A.l/...Fr...=....4J^k......._{3 |
00a0 | 01 00 00 00 08 00 00 00 00 80 00 00 00 00 00 08 00 00 00 00 80 00 00 00 00 00 08 00 00 00 00 80 | .............................# Locate LuaJIT library
# This module defines
# LUAJIT_FOUND, if false, do not try to link to Lua
# 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.
FIND_PATH(LUA_INCLUDE_DIR luajit.h
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES include/luajit-2.1 include/luajit-2.0 include/luajit-5_1-2.1 include/luajit-5_1-2.0 include luajit
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
# Test if running on vcpkg toolchain
if(DEFINED VCPKG_TARGET_TRIPLET AND DEFINED VCPKG_APPLOCAL_DEPS)
# On vcpkg luajit is 'lua51' and normal lua is 'lua'
FIND_LIBRARY(LUA_LIBRARY
NAMES lua51
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES lib
)
else()
FIND_LIBRARY(LUA_LIBRARY
NAMES luajit-5.1
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
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
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
|