INCLUDE(FindPackageHandleStandardArgs)

IF (NOT LUA_INCLUDE_DIR)
    FIND_PATH(LUA_INCLUDE_DIR lua.h HINTS $ENV{LUA_DIR})
ENDIF()

IF (NOT LUA_LIBRARIES)
    FIND_LIBRARY(LUA_LIBRARIES lua HINTS $ENV{LUA_DIR})
ENDIF()

MARK_AS_ADVANCED(LUA_INCLUDE_DIR)
MARK_AS_ADVANCED(LUA_LIBRARIES)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(
    Lua
    DEFAULT_MSG
    LUA_LIBRARIES
    LUA_INCLUDE_DIR
)

