Skip to content

Commit

Permalink
修复带源码编译的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Aug 24, 2023
1 parent eeac6ce commit 602402f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion third-party/lua-5.1.5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ else()
endif()

if(WIN32)
target_compile_definitions(lua51 PUBLIC -DLUA_BUILD_AS_DLL)
if (LUA_BUILD_AS_DLL)
target_compile_definitions(lua51 PUBLIC -DLUA_BUILD_AS_DLL)
endif()
else()
target_compile_options(lua51 PUBLIC -fPIC)
endif(WIN32)
Expand Down
4 changes: 3 additions & 1 deletion third-party/lua-5.3.5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ else()
endif()

if(WIN32)
target_compile_definitions(lua53 PUBLIC -DLUA_BUILD_AS_DLL)
if (LUA_BUILD_AS_DLL)
target_compile_definitions(lua53 PUBLIC -DLUA_BUILD_AS_DLL)
endif()
else()
target_compile_options(lua53 PUBLIC -fPIC)
endif(WIN32)
Expand Down
4 changes: 3 additions & 1 deletion third-party/lua-5.4.0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ else()
endif()

if(WIN32)
target_compile_definitions(lua54 PUBLIC -DLUA_BUILD_AS_DLL)
if (LUA_BUILD_AS_DLL)
target_compile_definitions(lua54 PUBLIC -DLUA_BUILD_AS_DLL)
endif()
else()
target_compile_options(lua54 PUBLIC -fPIC)
endif(WIN32)
Expand Down

0 comments on commit 602402f

Please sign in to comment.