Skip to content

Commit 602402f

Browse files
committed
修复带源码编译的错误
1 parent eeac6ce commit 602402f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

third-party/lua-5.1.5/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ else()
2020
endif()
2121

2222
if(WIN32)
23-
target_compile_definitions(lua51 PUBLIC -DLUA_BUILD_AS_DLL)
23+
if (LUA_BUILD_AS_DLL)
24+
target_compile_definitions(lua51 PUBLIC -DLUA_BUILD_AS_DLL)
25+
endif()
2426
else()
2527
target_compile_options(lua51 PUBLIC -fPIC)
2628
endif(WIN32)

third-party/lua-5.3.5/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ else()
2020
endif()
2121

2222
if(WIN32)
23-
target_compile_definitions(lua53 PUBLIC -DLUA_BUILD_AS_DLL)
23+
if (LUA_BUILD_AS_DLL)
24+
target_compile_definitions(lua53 PUBLIC -DLUA_BUILD_AS_DLL)
25+
endif()
2426
else()
2527
target_compile_options(lua53 PUBLIC -fPIC)
2628
endif(WIN32)

third-party/lua-5.4.0/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ else()
2020
endif()
2121

2222
if(WIN32)
23-
target_compile_definitions(lua54 PUBLIC -DLUA_BUILD_AS_DLL)
23+
if (LUA_BUILD_AS_DLL)
24+
target_compile_definitions(lua54 PUBLIC -DLUA_BUILD_AS_DLL)
25+
endif()
2426
else()
2527
target_compile_options(lua54 PUBLIC -fPIC)
2628
endif(WIN32)

0 commit comments

Comments
 (0)