1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-23 06:41:08 +00:00

Build components with position independent code only for Android

openmw is build as shared library with position independent code enabled there
so linked static libraries need to have this too.
This commit is contained in:
elsid 2024-02-18 19:36:53 +01:00
parent e9c672b297
commit efbc37d22f
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

View File

@ -526,11 +526,9 @@ if (USE_QT)
QT_WRAP_UI(ESM_UI_HDR ${ESM_UI}) QT_WRAP_UI(ESM_UI_HDR ${ESM_UI})
endif() endif()
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") if (ANDROID)
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND NOT APPLE) set_property(TARGET components PROPERTY POSTION_INDEPENDENT_CODE ON)
add_definitions(-fPIC) endif()
endif()
endif ()
include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})