-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Pika-Software/dev
Moonloader 2.0
- Loading branch information
Showing
35 changed files
with
1,472 additions
and
942 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.vscode | ||
/build* | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
[submodule "third-party/lua"] | ||
path = third-party/lua | ||
url = https://github.com/lubgr/lua-cmake | ||
[submodule "third-party/moonscript"] | ||
path = third-party/moonscript | ||
url = https://github.com/leafo/moonscript.git | ||
[submodule "third-party/efsw"] | ||
path = third-party/efsw | ||
url = https://github.com/SpartanJ/efsw.git | ||
[submodule "third-party/Yuescript"] | ||
path = third-party/Yuescript | ||
url = https://github.com/pigpigyyy/Yuescript.git | ||
[submodule "third-party/lua5.1"] | ||
path = third-party/lua5.2 | ||
url = https://github.com/lua/lua.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.3.0 | ||
2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
include(find_garrysmod_common.cmake) | ||
include(CMakeRC.cmake) | ||
include(find_Yuescript.cmake) | ||
include(find_lua52.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
project(yue CXX) | ||
|
||
set(YUESCRIPT_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../third-party/Yuescript) | ||
cmake_path(NORMAL_PATH YUESCRIPT_ROOT) | ||
set(YUESCRIPT_SRC ${YUESCRIPT_ROOT}/src) | ||
|
||
add_library(libyue | ||
"${YUESCRIPT_SRC}/yuescript/ast.cpp" | ||
"${YUESCRIPT_SRC}/yuescript/parser.cpp" | ||
"${YUESCRIPT_SRC}/yuescript/yue_ast.cpp" | ||
"${YUESCRIPT_SRC}/yuescript/yue_parser.cpp" | ||
"${YUESCRIPT_SRC}/yuescript/yue_compiler.cpp" | ||
"${YUESCRIPT_SRC}/yuescript/yuescript.cpp" | ||
) | ||
|
||
target_link_libraries(libyue PRIVATE lua::lib) | ||
|
||
target_include_directories(libyue PUBLIC ${YUESCRIPT_SRC}) | ||
target_compile_definitions(libyue PRIVATE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
project(lua52 C) | ||
|
||
set(LUA_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../third-party/lua5.2) | ||
cmake_path(NORMAL_PATH YUESCRIPT_ROOT) | ||
|
||
set(LUA_SRC lapi.c lcode.c lctype.c ldebug.c | ||
ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c | ||
lobject.c lopcodes.c lparser.c lstate.c | ||
lstring.c ltable.c ltm.c lundump.c lvm.c | ||
lzio.c lauxlib.c lbaselib.c lbitlib.c | ||
lcorolib.c ldblib.c liolib.c lmathlib.c | ||
loslib.c lstrlib.c ltablib.c loadlib.c linit.c | ||
) | ||
|
||
set(LUA_PUBLIC_HEADERS lauxlib.h lua.h luaconf.h lualib.h) | ||
|
||
list(TRANSFORM LUA_SRC PREPEND ${LUA_ROOT}/) | ||
list(TRANSFORM LUA_PUBLIC_HEADERS PREPEND ${LUA_ROOT}/) | ||
|
||
add_library(lua52 ${LUA_SRC}) | ||
|
||
target_compile_definitions(lua52 | ||
PRIVATE | ||
$<$<PLATFORM_ID:Linux>:LUA_USE_LINUX>) | ||
|
||
target_compile_options(lua52 | ||
PRIVATE | ||
$<$<OR:$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:GNU>>: | ||
-Wextra -Wshadow -Wsign-compare -Wundef -Wwrite-strings -Wredundant-decls | ||
-Wdisabled-optimization -Waggregate-return -Wdouble-promotion -Wdeclaration-after-statement | ||
-Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wc++-compat -Wold-style-definition>) | ||
|
||
set(LUA_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include) | ||
file(COPY ${LUA_PUBLIC_HEADERS} DESTINATION ${LUA_INCLUDE_DIR}) | ||
|
||
target_include_directories(lua52 PRIVATE ${LUA_ROOT}) | ||
target_include_directories(lua52 INTERFACE ${LUA_INCLUDE_DIR}) | ||
|
||
add_library(lua::lib ALIAS lua52) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.