Skip to content

Commit 8aeb648

Browse files
committed
加上-fPIC
1 parent e08601b commit 8aeb648

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

third-party/lua-5.1.5/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ endif()
2121

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

2628
target_sources(lua51 PRIVATE

third-party/lua-5.2.4/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(lua52 PUBLIC -DLUA_BUILD_AS_DLL)
23+
target_compile_definitions(lua51 PUBLIC -DLUA_BUILD_AS_DLL)
24+
else()
25+
target_compile_options(lua51 PUBLIC -fPIC)
2426
endif(WIN32)
2527

2628
target_sources(lua52 PRIVATE

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+
target_compile_definitions(lua51 PUBLIC -DLUA_BUILD_AS_DLL)
24+
else()
25+
target_compile_options(lua51 PUBLIC -fPIC)
2426
endif(WIN32)
2527

2628
target_sources(lua53 PRIVATE

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+
target_compile_definitions(lua51 PUBLIC -DLUA_BUILD_AS_DLL)
24+
else()
25+
target_compile_options(lua51 PUBLIC -fPIC)
2426
endif(WIN32)
2527

2628
target_sources(lua54 PRIVATE

0 commit comments

Comments
 (0)