Skip to content

Commit a04f63e

Browse files
authored
Merge pull request #309 from chenqinggang001/master
Update CMakeLists.txt support Android 16kb page size
2 parents cc52d57 + 2bb8179 commit a04f63e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cpp/inspireface/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ target_include_directories(InspireFace PUBLIC
150150
)
151151

152152
if (ANDROID)
153+
target_link_options(${CMAKE_PROJECT_NAME} PRIVATE "-Wl,-z,max-page-size=16384")
154+
if(ANDROID_NDK_MAJOR LESS_EQUAL 22)
155+
target_link_options(${CMAKE_PROJECT_NAME} PRIVATE "-Wl,-z,common-page-size=16384")
156+
endif()
153157
target_link_libraries(InspireFace PUBLIC ${LINK_THIRD_LIBS} jnigraphics log)
154158

155159
set_target_properties(InspireFace PROPERTIES
@@ -263,4 +267,4 @@ if (NOT IOS)
263267

264268
endif()
265269

266-
endif()
270+
endif()

0 commit comments

Comments
 (0)