Merge 607929ebaa66dfa59ead2e78f428793b5a52c569 into 5db512287cb735c43eddae6cf57a0053250758c8
This commit is contained in:
commit
d72f723061
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20)
|
|||||||
|
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
project(YimMenu CXX ASM_MASM)
|
project(YimMenu C CXX)
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
message(FATAL_ERROR "Unsupported compiler used '${CMAKE_CXX_COMPILER_ID}', YimMenu only supports MSVC.")
|
message(FATAL_ERROR "Unsupported compiler used '${CMAKE_CXX_COMPILER_ID}', YimMenu only supports MSVC.")
|
||||||
@ -60,10 +60,12 @@ target_include_directories(YimMenu PRIVATE
|
|||||||
"${imgui_SOURCE_DIR}"
|
"${imgui_SOURCE_DIR}"
|
||||||
"${minhook_SOURCE_DIR}/src/hde"
|
"${minhook_SOURCE_DIR}/src/hde"
|
||||||
"${asmjit_SOURCE_DIR}/src"
|
"${asmjit_SOURCE_DIR}/src"
|
||||||
|
"${luajit_SOURCE_DIR}/src"
|
||||||
|
"${luajit_BINARY_DIR}/src"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_precompile_headers(YimMenu PRIVATE "${SRC_DIR}/common.hpp")
|
target_precompile_headers(YimMenu PRIVATE "${SRC_DIR}/common.hpp")
|
||||||
target_link_libraries(YimMenu PRIVATE pugixml minhook AsyncLogger dbghelp imgui cpr lua_static asmjit::asmjit)
|
target_link_libraries(YimMenu PRIVATE pugixml minhook AsyncLogger dbghelp imgui cpr libluajit asmjit::asmjit)
|
||||||
|
|
||||||
# Warnings as errors
|
# Warnings as errors
|
||||||
set_property(TARGET YimMenu PROPERTY COMPILE_WARNING_AS_ERROR ON)
|
set_property(TARGET YimMenu PROPERTY COMPILE_WARNING_AS_ERROR ON)
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
message("Lua")
|
message("LuaJIT")
|
||||||
|
|
||||||
|
set(LUAJIT_BUILD_TOOL OFF)
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
Lua
|
luajit
|
||||||
GIT_REPOSITORY https://github.com/walterschell/Lua.git
|
GIT_REPOSITORY https://github.com/WohlSoft/LuaJIT.git
|
||||||
GIT_TAG a2e0125df529894f5e25d7d477b2df4e37690e0f
|
GIT_TAG 27878965958986687f8caaf8a2b6b73bc5df85e0
|
||||||
GIT_PROGRESS TRUE
|
GIT_PROGRESS TRUE
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(Lua)
|
|
||||||
|
|
||||||
set_property(TARGET lua_static PROPERTY CXX_STANDARD 23)
|
add_compile_definitions("_CRT_SECURE_NO_WARNINGS")
|
||||||
|
FetchContent_MakeAvailable(luajit)
|
||||||
|
@ -103,6 +103,10 @@ namespace big
|
|||||||
sol::lib::table,
|
sol::lib::table,
|
||||||
sol::lib::bit32,
|
sol::lib::bit32,
|
||||||
sol::lib::io,
|
sol::lib::io,
|
||||||
|
#if SOL_IS_ON(SOL_USE_LUAJIT)
|
||||||
|
sol::lib::ffi,
|
||||||
|
sol::lib::jit,
|
||||||
|
#endif
|
||||||
sol::lib::utf8
|
sol::lib::utf8
|
||||||
);
|
);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
@ -284,8 +288,13 @@ namespace big
|
|||||||
|
|
||||||
// 1 2 3 4
|
// 1 2 3 4
|
||||||
// {searcher_preload, searcher_Lua, searcher_C, searcher_Croot, NULL};
|
// {searcher_preload, searcher_Lua, searcher_C, searcher_Croot, NULL};
|
||||||
|
#if SOL_LUA_VERSION_I_ < 502
|
||||||
|
m_state["package"]["loaders"][3] = not_supported_lua_function("package.loaders C");
|
||||||
|
m_state["package"]["loaders"][4] = not_supported_lua_function("package.loaders Croot");
|
||||||
|
#else
|
||||||
m_state["package"]["searchers"][3] = not_supported_lua_function("package.searcher C");
|
m_state["package"]["searchers"][3] = not_supported_lua_function("package.searcher C");
|
||||||
m_state["package"]["searchers"][4] = not_supported_lua_function("package.searcher Croot");
|
m_state["package"]["searchers"][4] = not_supported_lua_function("package.searcher Croot");
|
||||||
|
#endif
|
||||||
|
|
||||||
set_folder_for_lua_require(scripts_folder);
|
set_folder_for_lua_require(scripts_folder);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user