Skip to content

Commit a779e35

Browse files
committed
Fix linux link error
1 parent 8b50c08 commit a779e35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/Modules/AXConfigDefine.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ if (WINRT)
1818
set(CMAKE_CXX_FLAGS "/sdl- ${CMAKE_CXX_FLAGS}")
1919
endif()
2020

21+
if (ANDROID OR LINUX)
22+
set(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}")
23+
set(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}")
24+
endif()
25+
2126
# config c standard
2227
if (WINDOWS)
2328
message(STATUS "CMAKE_HOST_SYSTEM_VERSION: ${CMAKE_HOST_SYSTEM_VERSION}")

0 commit comments

Comments
 (0)