2014-03-03 08:09:06 -07:00
|
|
|
find_path(LUAJIT_INCLUDE_DIR luajit.h
|
2019-07-04 06:19:25 -07:00
|
|
|
PATH_SUFFIXES luajit-2.0 luajit-2.1)
|
2014-03-03 08:09:06 -07:00
|
|
|
|
2014-07-14 17:10:27 -07:00
|
|
|
if(MSVC)
|
|
|
|
list(APPEND LUAJIT_NAMES lua51)
|
2022-05-17 06:08:24 -07:00
|
|
|
elseif(MINGW)
|
|
|
|
list(APPEND LUAJIT_NAMES libluajit libluajit-5.1)
|
2014-07-14 17:10:27 -07:00
|
|
|
else()
|
|
|
|
list(APPEND LUAJIT_NAMES luajit-5.1)
|
|
|
|
endif()
|
2014-03-03 08:09:06 -07:00
|
|
|
|
2023-02-26 14:32:08 -07:00
|
|
|
find_library(LUAJIT_LIBRARY NAMES ${LUAJIT_NAMES})
|
2014-03-03 08:09:06 -07:00
|
|
|
|
|
|
|
set(LUAJIT_LIBRARIES ${LUAJIT_LIBRARY})
|
|
|
|
set(LUAJIT_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIR})
|
|
|
|
|
2023-03-02 14:50:43 -07:00
|
|
|
find_package_handle_standard_args(Luajit DEFAULT_MSG
|
2014-03-03 08:09:06 -07:00
|
|
|
LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
|
|
|
|
|
|
|
|
mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARY)
|