Feature: use module in cmake

pull/221/head
xufuji456 2 years ago
parent c21a2cf584
commit c68887339a
  1. 40
      app/src/main/cpp/CMakeLists.txt

@ -10,38 +10,46 @@ cmake_minimum_required(VERSION 3.4.1)
# You can define multiple libraries, and CMake builds them for you. # You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK. # Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library. set(SRC_FFMPEG
media-handle
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
ffmpeg/cmdutils.c ffmpeg/cmdutils.c
ffmpeg/ffmpeg.c ffmpeg/ffmpeg.c
ffmpeg/ffmpeg_filter.c ffmpeg/ffmpeg_filter.c
ffmpeg/ffmpeg_opt.c ffmpeg/ffmpeg_opt.c
ffmpeg_cmd.c ffmpeg_cmd.c
ffmpeg/ffprobe.c ffmpeg/ffprobe.c
ffmpeg/ffmpeg_hw.c ffmpeg/ffmpeg_hw.c)
video_player.cpp
video_filter.c set(SRC_VISUALIZER
ffprobe_cmd.cpp
video_cutting.cpp
visualizer/fft.cpp visualizer/fft.cpp
visualizer/fixed_fft.cpp visualizer/fixed_fft.cpp
visualizer/frank_visualizer.cpp visualizer/frank_visualizer.cpp
visualizer/frank_visualizer_jni.cpp visualizer/frank_visualizer_jni.cpp
visualizer/window.cpp visualizer/window.cpp)
set(SRC_METADATA
metadata/media_retriever.cpp metadata/media_retriever.cpp
metadata/media_retriever_jni.cpp metadata/media_retriever_jni.cpp
metadata/metadata_util.c metadata/metadata_util.c
metadata/ffmpeg_media_retriever.c metadata/ffmpeg_media_retriever.c)
add_library( # Sets the name of the library.
media-handle
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
${SRC_FFMPEG}
${SRC_VISUALIZER}
${SRC_METADATA}
video_player.cpp
video_filter.c
ffprobe_cmd.cpp
video_cutting.cpp
yuv/yuv_converter.cpp yuv/yuv_converter.cpp
pcm/pcm_process.cpp
media_transcode.cpp media_transcode.cpp
ff_audio_resample.cpp ff_audio_resample.cpp
pcm/pcm_process.cpp
common_media_jni.cpp common_media_jni.cpp
ff_audio_player.cpp ff_audio_player.cpp
audio_player_jni.cpp audio_player_jni.cpp

Loading…
Cancel
Save