提交 6627801a 编写于 作者: H hedaoyuan

Follow comments.

上级 d94dd75e
...@@ -87,11 +87,15 @@ if(ANDROID OR IOS) ...@@ -87,11 +87,15 @@ if(ANDROID OR IOS)
set(WITH_MKLML OFF CACHE STRING set(WITH_MKLML OFF CACHE STRING
"Disable MKLML package when cross-compiling for Android and iOS" FORCE) "Disable MKLML package when cross-compiling for Android and iOS" FORCE)
if(WITH_C_API)
# Compile PaddlePaddle mobile inference library # Compile PaddlePaddle mobile inference library
if (NOT WITH_C_API)
set(WITH_C_API ON CACHE STRING
"Always compile the C_API when cross-compiling for Android and iOS" FORCE)
endif()
set(MOBILE_INFERENCE ON) set(MOBILE_INFERENCE ON)
add_definitions(-DPADDLE_MOBILE_INFERENCE) add_definitions(-DPADDLE_MOBILE_INFERENCE)
endif()
# TODO: Need Open the WITH_TESTING
set(WITH_TESTING OFF CACHE STRING "Disable TESTING when cross-compiling set(WITH_TESTING OFF CACHE STRING "Disable TESTING when cross-compiling
for Android and iOS" FORCE) for Android and iOS" FORCE)
endif() endif()
......
...@@ -48,9 +48,7 @@ if(NOT IOS) ...@@ -48,9 +48,7 @@ if(NOT IOS)
add_library(paddle_capi_shared SHARED ${CAPI_SOURCES}) add_library(paddle_capi_shared SHARED ${CAPI_SOURCES})
set_target_properties(paddle_capi_shared PROPERTIES LINK_FLAGS "${LINK_FLAGS}") set_target_properties(paddle_capi_shared PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
target_include_directories(paddle_capi_shared PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(paddle_capi_shared PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
link_paddle_exe(paddle_capi_shared)
link_paddle_exe(paddle_capi_shared)
endif() endif()
# install library & headers. # install library & headers.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册