fix compile for python

This commit is contained in:
jiangjiajun
2022-07-13 02:48:08 +00:00
parent ec19fb10d3
commit 6c5bd8afad
2 changed files with 5 additions and 0 deletions

View File

@@ -216,6 +216,10 @@ if(BUILD_FASTDEPLOY_PYTHON)
set(CMAKE_NO_SYSTEM_FROM_IMPORTED 1)
endif()
if(NOT ENABLE_VISION)
file(GLOB_RECURSE VISION_PYBIND_SRCS ${PROJECT_SOURCE_DIR}/fastdeploy/vision/*_pybind.cc)
list(REMOVE_ITEM DEPLOY_PYBIND_SRCS ${VISION_PYBIND_SRCS})
endif()
add_library(fastdeploy_main MODULE ${DEPLOY_PYBIND_SRCS})
redefine_file_macro(fastdeploy_main)
set_target_properties(fastdeploy_main PROPERTIES PREFIX "")

View File

@@ -13,6 +13,7 @@
// limitations under the License.
#include "fastdeploy/pybind/main.h"
#include "fastdeploy/fastdeploy_model.h"
namespace fastdeploy {