Skip to content

Commit 1b4d1e9

Browse files
committed
Adding android related cmake build options
1 parent a76e176 commit 1b4d1e9

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,22 @@ if(APPLE)
254254
-flax-vector-conversions)
255255
endif()
256256

257+
258+
if(ANDROID)
259+
if(DEFINED ANDROID_NDK)
260+
set(_android_ndk "${ANDROID_NDK}")
261+
elseif(DEFINED CMAKE_ANDROID_NDK)
262+
set(_android_ndk "${CMAKE_ANDROID_NDK}")
263+
endif()
264+
if(_android_ndk)
265+
target_include_directories(openshot-audio PRIVATE
266+
"${_android_ndk}/sources/android/cpufeatures")
267+
target_sources(openshot-audio PRIVATE
268+
"${_android_ndk}/sources/android/cpufeatures/cpu-features.c")
269+
endif()
270+
target_link_libraries(openshot-audio PUBLIC log)
271+
endif()
272+
257273
# ALSA (Linux only)
258274
if(UNIX AND NOT APPLE)
259275
set(NEED_ALSA TRUE)

0 commit comments

Comments
 (0)