Skip to content

Commit

Permalink
link mmdeploy to python target when monolithic option is on
Browse files Browse the repository at this point in the history
  • Loading branch information
lvhan028 committed Jul 28, 2022
1 parent dc24ab0 commit 61fdc44
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions csrc/mmdeploy/apis/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ endforeach ()

pybind11_add_module(${PROJECT_NAME} ${MMDEPLOY_PYTHON_SRCS})

mmdeploy_load_static(${PROJECT_NAME} MMDeployStaticModules)
mmdeploy_load_dynamic(${PROJECT_NAME} MMDeployDynamicModules)
target_link_libraries(${PROJECT_NAME} PRIVATE MMDeployLibs)

target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR})
if (MMDEPLOY_BUILD_SDK_MONOLITHIC)
target_link_libraries(${PROJECT_NAME} PRIVATE mmdeploy)
else ()
mmdeploy_load_static(${PROJECT_NAME} MMDeployStaticModules)
mmdeploy_load_dynamic(${PROJECT_NAME} MMDeployDynamicModules)
target_link_libraries(${PROJECT_NAME} PRIVATE MMDeployLibs)

target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR})
endif ()

0 comments on commit 61fdc44

Please sign in to comment.