Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhaozg/luajit-cmake
cmake build for LuaJIT, macOS, Linux, Windows, MingW, iOS, Android
https://github.com/zhaozg/luajit-cmake
build cmake lua luajit
Last synced: 4 days ago
JSON representation
cmake build for LuaJIT, macOS, Linux, Windows, MingW, iOS, Android
- Host: GitHub
- URL: https://github.com/zhaozg/luajit-cmake
- Owner: zhaozg
- License: mit
- Created: 2019-07-20T02:02:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-14T02:13:53.000Z (3 months ago)
- Last Synced: 2025-01-31T00:09:46.714Z (11 days ago)
- Topics: build, cmake, lua, luajit
- Language: CMake
- Homepage:
- Size: 80.1 KB
- Stars: 55
- Watchers: 4
- Forks: 24
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# luajit-cmake
A flexible cmake builder for LuaJIT. Forked from
[WohlSoft/LuaJIT](https://github.com/WohlSoft/LuaJIT) and update.## Build
### make
Use a GNU compatible make.
`make -DLUAJIT_DIR=...` or `mingw32-make -DLUAJIT_DIR=...` or
`gnumake -DLUAJIT_DIR=...`._Note_: When use mingw32-make, please change `\\` to `/` in file path on Windows.
### cmake
Use cmake to compile.
```bash
cmake -H. -Bbuild -DLUAJIT_DIR=...
make --build build --config Release
```### Embed
```cmake
add_subdirectory(luajit-cmake)
target_link_libraries(yourTarget PRIVATE luajit::lib luajit::header)
```Look samples at [lua-forge](https://github.com/zhaozg/lua-forge/blob/master/CMakeLists.txt)
### CrossCompile
#### iOS
```bash
make iOS
```#### Android
```bash
make Android
```#### Windows
```bash
make Windows
```#### Note
_Note_: The i386 architecture is deprecated for macOS (remove from the Xcode
build setting: ARCHS). So I use mingw-w64 and wine to build and run 32 bits
minilua and buildvm.