Skip to content

Commit bb1fe5f

Browse files
authored
Merge pull request #33 from CppCXY/master
修复调试崩溃问题
2 parents 7655c8a + ff7937d commit bb1fe5f

File tree

91 files changed

+5264
-2421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+5264
-2421
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vscode
22
build
3+
.vs

CMakeLists.txt

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.2)
1+
cmake_minimum_required(VERSION 3.11)
22

33
project (emmy)
44
set(CMAKE_INSTALL_PREFIX install)
@@ -43,7 +43,7 @@ macro(source_group_by_dir proj_dir source_files)
4343
endif(MSVC OR APPLE)
4444
endmacro(source_group_by_dir)
4545

46-
set(EMMY_LUA_VERSION "54" CACHE STRING "Lua version: 51/52/53")
46+
set(EMMY_LUA_VERSION "54" CACHE STRING "Lua version: jit/51/52/53/54")
4747

4848
if(${EMMY_LUA_VERSION} STREQUAL "54")
4949
set(EMMY_LUA_DIR "lua-5.4.0")
@@ -57,14 +57,34 @@ elseif(${EMMY_LUA_VERSION} STREQUAL "52")
5757
elseif(${EMMY_LUA_VERSION} STREQUAL "51")
5858
set(EMMY_LUA_DIR "lua-5.1.5")
5959
add_definitions(-DEMMY_LUA_51)
60+
elseif(${EMMY_LUA_VERSION} STREQUAL "jit")
61+
set(EMMY_LUA_DIR "luajit")
62+
add_definitions(-DEMMY_LUA_JIT)
63+
# if LUAJIT support lua_setfuncs use this macro define
64+
#add_definitions(-DEMMY_LUA_JIT_SUPPORT_LUA_SETFUNCS)
6065
endif()
6166

6267
add_definitions(-DEMMY_CORE_VERSION="1.0.16")
6368

64-
add_subdirectory(third-party/${EMMY_LUA_DIR})
69+
if(EMMY_USE_LUA_SOURCE)
70+
add_definitions(-DEMMY_USE_LUA_SOURCE)
71+
include_directories(
72+
${CMAKE_SOURCE_DIR}/third-party/${EMMY_LUA_DIR}/src
73+
)
74+
if(${EMMY_LUA_VERSION} STREQUAL "jit")
75+
#ignore
76+
else()
77+
add_subdirectory(third-party/${EMMY_LUA_DIR})
78+
endif()
79+
endif()
80+
6581
add_subdirectory(third-party/libuv-1.29.0)
82+
add_subdirectory(emmy_debugger)
6683
add_subdirectory(emmy_core)
84+
6785
if(WIN32)
86+
add_subdirectory(shared)
6887
add_subdirectory(emmy_tool)
6988
add_subdirectory(third-party/EasyHook)
89+
add_subdirectory(emmy_hook)
7090
endif(WIN32)

CMakeSettings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Debug",
5+
"generator": "Visual Studio 16 2019 Win64",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [ "msvc_x64_x64" ],
8+
"buildRoot": "${projectDir}\\out\\build\\${name}",
9+
"installRoot": "${projectDir}\\out\\install\\${name}",
10+
"cmakeCommandArgs": "",
11+
"buildCommandArgs": "",
12+
"ctestCommandArgs": ""
13+
}
14+
]
15+
}

android/android.bat

Lines changed: 0 additions & 9 deletions
This file was deleted.

android/readme.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
cmake_minimum_required(VERSION 3.11)
2+
3+
project (lua)
4+
5+
add_executable(lua)
6+
7+
set(EMMY_LUA_VERSION "54" CACHE STRING "Lua version: 51/52/53/54")
8+
9+
if(${EMMY_LUA_VERSION} STREQUAL "54")
10+
set(EMMY_LUA_DIR "lua-5.4.0")
11+
elseif(${EMMY_LUA_VERSION} STREQUAL "53")
12+
set(EMMY_LUA_DIR "lua-5.3.5")
13+
elseif(${EMMY_LUA_VERSION} STREQUAL "52")
14+
set(EMMY_LUA_DIR "lua-5.2.4")
15+
elseif(${EMMY_LUA_VERSION} STREQUAL "51")
16+
set(EMMY_LUA_DIR "lua-5.1.5")
17+
endif()
18+
19+
option(LUA_BUILD_AS_DLL "USE" ON)
20+
set(lua_dll_SOURCE_DIR "../../third-party/${EMMY_LUA_DIR}")
21+
22+
add_subdirectory("${lua_dll_SOURCE_DIR}" luadll.out)
23+
24+
add_dependencies(lua "lua${EMMY_LUA_VERSION}")
25+
26+
target_sources(lua PUBLIC
27+
28+
#SOURCES
29+
${lua_dll_SOURCE_DIR}/src/lua.c
30+
)
31+
32+
target_link_libraries(lua "lua${EMMY_LUA_VERSION}")
33+
34+
35+
install(
36+
TARGETS lua
37+
LIBRARY DESTINATION ./
38+
RUNTIME DESTINATION ./
39+
)
40+
41+
install(
42+
TARGETS "lua${EMMY_LUA_VERSION}"
43+
LIBRARY DESTINATION ./
44+
RUNTIME DESTINATION ./
45+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mkdir buildLua51
2+
cd buildLua51
3+
cmake .. -A x64 -DEMMY_LUA_VERSION=51
4+
cmake --build . --config Debug
5+
cmake --install . --config Debug --prefix ../Lua51
6+
cd ..
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mkdir buildLua52
2+
cd buildLua52
3+
cmake .. -A x64 -DEMMY_LUA_VERSION=52
4+
cmake --build . --config Debug
5+
cmake --install . --config Debug --prefix ../Lua52
6+
cd ..
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mkdir buildLua53
2+
cd buildLua53
3+
cmake .. -A x64 -DEMMY_LUA_VERSION=53
4+
cmake --build . --config Debug
5+
cmake --install . --config Debug --prefix ../Lua53
6+
cd ..
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mkdir buildLua54
2+
cd buildLua54
3+
cmake .. -A x64 -DEMMY_LUA_VERSION=54
4+
cmake --build . --config Debug
5+
cmake --install . --config Debug --prefix ../Lua54
6+
cd ..

0 commit comments

Comments
 (0)