Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix android build #698

Merged
merged 3 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion csrc/mmdeploy/apis/java/native/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Copyright (c) OpenMMLab. All rights reserved.
project(mmdeploy_java)

find_package(JNI REQUIRED)
if (NOT ANDROID)
hanrui1sensetime marked this conversation as resolved.
Show resolved Hide resolved
find_package(JNI REQUIRED)
else ()
set(JNI_LIBRARIES)
endif()

mmdeploy_add_library(${PROJECT_NAME} SHARED EXCLUDE
mmdeploy_Classifier.cpp
Expand All @@ -17,6 +21,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE

mmdeploy_load_static(${PROJECT_NAME} MMDeployStaticModules)
mmdeploy_load_dynamic(${PROJECT_NAME} MMDeployDynamicModules)

target_link_libraries(${PROJECT_NAME} PRIVATE
${JNI_LIBRARIES} MMDeployLibs)
install(TARGETS ${PROJECT_NAME}
Expand Down
6 changes: 6 additions & 0 deletions docs/en/01-how-to-build/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ make install
</code></pre>
</td>
</tr>
<tr>
<td>OpenJDK </td>
<td>It is necessary for building Java API.</br>
See <a href='https://github.com/open-mmlab/mmdeploy/blob/master/csrc/mmdeploy/apis/java/README.md'> Java API build </a> for building tutorials.
</td>
</tr>
</tbody>
</table>

Expand Down
6 changes: 6 additions & 0 deletions docs/zh_cn/01-how-to-build/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ make install
</code></pre>
</td>
</tr>
<tr>
<td>OpenJDK </td>
<td>编译Java API之前需要先准备OpenJDK开发环境</br>
请参考 <a href='https://github.com/open-mmlab/mmdeploy/blob/master/csrc/mmdeploy/apis/java/README.md'> Java API 编译 </a> 进行构建.
</td>
</tr>
</tbody>
</table>

Expand Down