|
| 1 | +cmake_minimum_required(VERSION 3.4.1) |
| 2 | + |
| 3 | +set(lib_src_DIR ${CMAKE_SOURCE_DIR}/jni_libs/${ANDROID_ABI}) |
| 4 | +include_directories(${CMAKE_SOURCE_DIR}/jni_include) |
| 5 | + |
| 6 | +add_library(avcodec SHARED IMPORTED) |
| 7 | +set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${lib_src_DIR}/libavcodec-57.so) |
| 8 | + |
| 9 | +add_library(avformat SHARED IMPORTED) |
| 10 | +set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${lib_src_DIR}/libavformat-57.so) |
| 11 | + |
| 12 | +add_library(avutil SHARED IMPORTED) |
| 13 | +set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${lib_src_DIR}/libavutil-55.so) |
| 14 | + |
| 15 | +add_library(avfilter SHARED IMPORTED) |
| 16 | +set_target_properties(avfilter PROPERTIES IMPORTED_LOCATION ${lib_src_DIR}/libavfilter-6.so) |
| 17 | + |
| 18 | +add_library( |
| 19 | + xl_render |
| 20 | + SHARED |
| 21 | + |
| 22 | + src/main/cpp/xl_audio/xl_audio_player.h |
| 23 | + src/main/cpp/xl_audio/xl_audio_player.c |
| 24 | + src/main/cpp/xl_audio/xl_audio_filter.h |
| 25 | + src/main/cpp/xl_audio/xl_audio_filter.c |
| 26 | + |
| 27 | + src/main/cpp/xl_container/xl_packet_queue.h |
| 28 | + src/main/cpp/xl_container/xl_packet_queue.c |
| 29 | + src/main/cpp/xl_container/xl_packet_pool.h |
| 30 | + src/main/cpp/xl_container/xl_packet_pool.c |
| 31 | + src/main/cpp/xl_container/xl_frame_queue.h |
| 32 | + src/main/cpp/xl_container/xl_frame_queue.c |
| 33 | + src/main/cpp/xl_container/xl_frame_pool.h |
| 34 | + src/main/cpp/xl_container/xl_frame_pool.c |
| 35 | + |
| 36 | + src/main/cpp/xl_decoders/xl_player_video_sw_decode_thread.h |
| 37 | + src/main/cpp/xl_decoders/xl_player_video_sw_decode_thread.c |
| 38 | + src/main/cpp/xl_decoders/xl_player_video_hw_decode_thread.h |
| 39 | + src/main/cpp/xl_decoders/xl_player_video_hw_decode_thread.c |
| 40 | + src/main/cpp/xl_decoders/xl_player_audio_decode_thread.h |
| 41 | + src/main/cpp/xl_decoders/xl_player_audio_decode_thread.c |
| 42 | + src/main/cpp/xl_decoders/xl_mediacodec.h |
| 43 | + src/main/cpp/xl_decoders/xl_mediacodec.c |
| 44 | + |
| 45 | + src/main/cpp/xl_video/xl_tracker.h |
| 46 | + src/main/cpp/xl_video/xl_tracker.c |
| 47 | + src/main/cpp/xl_video/xl_mat4.h |
| 48 | + src/main/cpp/xl_video/xl_mat4.c |
| 49 | + src/main/cpp/xl_video/xl_model.h |
| 50 | + src/main/cpp/xl_video/xl_model.c |
| 51 | + src/main/cpp/xl_video/xl_mesh_factory.h |
| 52 | + src/main/cpp/xl_video/xl_mesh_factory.c |
| 53 | + src/main/cpp/xl_video/xl_model_ball.h |
| 54 | + src/main/cpp/xl_video/xl_model_ball.c |
| 55 | + src/main/cpp/xl_video/xl_model_rect.h |
| 56 | + src/main/cpp/xl_video/xl_model_rect.c |
| 57 | + src/main/cpp/xl_video/xl_model_vr.h |
| 58 | + src/main/cpp/xl_video/xl_model_vr.c |
| 59 | + src/main/cpp/xl_video/xl_texture.h |
| 60 | + src/main/cpp/xl_video/xl_texture.c |
| 61 | + src/main/cpp/xl_video/xl_glsl_program.h |
| 62 | + src/main/cpp/xl_video/xl_glsl_program.c |
| 63 | + src/main/cpp/xl_video/xl_video_render.h |
| 64 | + src/main/cpp/xl_video/xl_video_render.c |
| 65 | + src/main/cpp/xl_video/xl_player_gl_thread.h |
| 66 | + src/main/cpp/xl_video/xl_player_gl_thread.c |
| 67 | + |
| 68 | + src/main/cpp/xl_types/xl_macro.h |
| 69 | + src/main/cpp/xl_types/xl_player_types.h |
| 70 | + src/main/cpp/xl_types/xl_video_render_types.h |
| 71 | + |
| 72 | + src/main/cpp/xl_utils/xl_statistics.h |
| 73 | + src/main/cpp/xl_utils/xl_statistics.c |
| 74 | + src/main/cpp/xl_utils/xl_clock.h |
| 75 | + src/main/cpp/xl_utils/xl_clock.c |
| 76 | + src/main/cpp/xl_utils/xl_jni_reflect.h |
| 77 | + src/main/cpp/xl_utils/xl_jni_reflect.c |
| 78 | + |
| 79 | + src/main/cpp/xl_player.c |
| 80 | + src/main/cpp/xl_playerCore.h |
| 81 | + src/main/cpp/xl_playerCore.c |
| 82 | + src/main/cpp/xl_player_read_thread.h |
| 83 | + src/main/cpp/xl_player_read_thread.c |
| 84 | + |
| 85 | + |
| 86 | + ) |
| 87 | +add_library( |
| 88 | + ekf |
| 89 | + SHARED |
| 90 | + src/main/cpp/xl_head_tracker/Vector3d.h |
| 91 | + src/main/cpp/xl_head_tracker/Vector3d.cpp |
| 92 | + src/main/cpp/xl_head_tracker/SO3Util.h |
| 93 | + src/main/cpp/xl_head_tracker/SO3Util.cpp |
| 94 | + src/main/cpp/xl_head_tracker/Matrix3x3d.h |
| 95 | + src/main/cpp/xl_head_tracker/Matrix3x3d.cpp |
| 96 | + src/main/cpp/xl_head_tracker/OrientationEKF.h |
| 97 | + src/main/cpp/xl_head_tracker/OrientationEKF.cpp |
| 98 | + src/main/cpp/xl_head_tracker/HeadTracker.h |
| 99 | + src/main/cpp/xl_head_tracker/HeadTracker.cpp |
| 100 | + ) |
| 101 | + |
| 102 | +find_library( log-lib log ) |
| 103 | +find_library(android-lib android) |
| 104 | +find_library(bmp jnigraphics) |
| 105 | +find_library(glesv2-lib GLESv2) |
| 106 | +find_library(egl-lib EGL) |
| 107 | +find_library(sles-lib OpenSLES) |
| 108 | + |
| 109 | +if (${CMAKE_SYSTEM_VERSION} MATCHES "21") |
| 110 | + find_library(media-ndk mediandk) |
| 111 | + target_link_libraries( |
| 112 | + xl_render |
| 113 | + ekf |
| 114 | + avcodec |
| 115 | + avformat |
| 116 | + avutil |
| 117 | + avfilter |
| 118 | + ${log-lib} |
| 119 | + ${bmp} |
| 120 | + ${android-lib} |
| 121 | + ${egl-lib} |
| 122 | + ${glesv2-lib} |
| 123 | + ${sles-lib} |
| 124 | + ${media-ndk} |
| 125 | + ) |
| 126 | +else (${CMAKE_SYSTEM_VERSION} LESS "21") |
| 127 | + target_link_libraries( |
| 128 | + xl_render |
| 129 | + ekf |
| 130 | + avcodec |
| 131 | + avformat |
| 132 | + avutil |
| 133 | + avfilter |
| 134 | + ${log-lib} |
| 135 | + ${bmp} |
| 136 | + ${android-lib} |
| 137 | + ${egl-lib} |
| 138 | + ${glesv2-lib} |
| 139 | + ${sles-lib} |
| 140 | + ) |
| 141 | +endif(${CMAKE_SYSTEM_VERSION} MATCHES "21") |
0 commit comments