commit
a245878b8b
@ -99,8 +99,10 @@ if (WIN32)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libs/glfw)
|
||||
endif()
|
||||
else()
|
||||
# luajit has no CMakeLists.txt to use it as subdirectory, so install it manually
|
||||
find_package(Lua REQUIRED)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(LUAJIT REQUIRED luajit)
|
||||
set(LUA_LIBRARIES ${LUAJIT_LIBRARIES})
|
||||
set(LUA_INCLUDE_DIR ${LUAJIT_INCLUDE_DIR})
|
||||
find_package(PNG REQUIRED)
|
||||
set(PNGLIB PNG::PNG)
|
||||
set(VORBISLIB vorbis vorbisfile)
|
||||
|
||||
17
README.md
17
README.md
@ -42,29 +42,18 @@ sudo ln -s /usr/include/luajit-2.1 /usr/include/lua
|
||||
|
||||
#### RHEL-based distro:
|
||||
```sh
|
||||
sudo dnf install glfw-devel glfw glew-devel glm-devel libpng-devel libvorbis-devel openal-devel
|
||||
sudo dnf install glfw-devel glfw glew-devel glm-devel libpng-devel libvorbis-devel openal-devel luajit
|
||||
```
|
||||
|
||||
\+ install LuaJIT
|
||||
|
||||
#### Arch-based distro:
|
||||
If you use X11
|
||||
```sh
|
||||
sudo pacman -S glfw-x11 glew glm libpng libvorbis openal
|
||||
sudo pacman -S glfw-x11 glew glm libpng libvorbis openal luajit
|
||||
```
|
||||
|
||||
If you use Wayland
|
||||
```sh
|
||||
sudo pacman -S glfw-wayland glew glm libpng libvorbis openal
|
||||
```
|
||||
|
||||
\+ install LuaJIT
|
||||
|
||||
#### LuaJIT installation:
|
||||
```sh
|
||||
git clone https://luajit.org/git/luajit.git
|
||||
cd luajit
|
||||
make && sudo make install INSTALL_INC=/usr/include/lua
|
||||
sudo pacman -S glfw-wayland glew glm libpng libvorbis openal luajit
|
||||
```
|
||||
|
||||
#### macOS:
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
#ifndef LOGIC_SCRIPTING_LUA_H_
|
||||
#define LOGIC_SCRIPTING_LUA_H_
|
||||
|
||||
#ifdef __linux__
|
||||
#include <luajit-2.1/luaconf.h>
|
||||
#include <luajit-2.1/lua.hpp>
|
||||
#else
|
||||
#include <lua.hpp>
|
||||
#endif
|
||||
#include <exception>
|
||||
|
||||
namespace lua {
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
#ifndef LOGIC_SCRIPTING_LUA_UTIL_H_
|
||||
#define LOGIC_SCRIPTING_LUA_UTIL_H_
|
||||
|
||||
#ifdef __linux__
|
||||
#include <luajit-2.1/luaconf.h>
|
||||
#include <luajit-2.1/lua.hpp>
|
||||
#else
|
||||
#include <lua.hpp>
|
||||
#endif
|
||||
#include <glm/glm.hpp>
|
||||
#include "LuaState.h"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user