Modify file structure to separate python and cpp code (#223)

Modify code structure
This commit is contained in:
Jason
2022-09-14 15:44:13 +08:00
committed by GitHub
parent 26cb1dc838
commit 68523be411
290 changed files with 10 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ option(CSRCS_DIR_NAME "Name of source code directory")
option(LIBRARY_NAME "Name of build library name")
option(PY_LIBRARY_NAME "Name of build python library name")
if(NOT CSRCS_DIR_NAME)
set(CSRCS_DIR_NAME "csrc")
set(CSRCS_DIR_NAME ".")
endif()
if(NOT LIBRARY_NAME)
set(LIBRARY_NAME "fastdeploy")
@@ -254,7 +254,7 @@ if(ENABLE_TEXT)
endif()
configure_file(${PROJECT_SOURCE_DIR}/FastDeploy.cmake.in ${PROJECT_SOURCE_DIR}/FastDeploy.cmake @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/fastdeploy/c_lib_wrap.py.in ${PROJECT_SOURCE_DIR}/fastdeploy/c_lib_wrap.py)
configure_file(${PROJECT_SOURCE_DIR}/python/fastdeploy/c_lib_wrap.py.in ${PROJECT_SOURCE_DIR}/python/fastdeploy/c_lib_wrap.py)
list(REMOVE_ITEM ALL_DEPLOY_SRCS ${DEPLOY_PYBIND_SRCS})
@@ -420,13 +420,13 @@ if(BUILD_FASTDEPLOY_PYTHON)
file(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/fastdeploy/libs)
if(WIN32)
add_custom_target(copy_fd_libraries ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/Release ${PROJECT_SOURCE_DIR}/fastdeploy/libs/ DEPENDS ${PY_LIBRARY_NAME})
add_custom_target(copy_fd_libraries ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/Release ${PROJECT_SOURCE_DIR}/python/fastdeploy/libs/ DEPENDS ${PY_LIBRARY_NAME})
elseif(APPLE)
add_custom_target(copy_fd_libraries ALL COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/*.so** ${CMAKE_CURRENT_BINARY_DIR}/*.dylib** ${PROJECT_SOURCE_DIR}/fastdeploy/libs/ DEPENDS ${PY_LIBRARY_NAME})
add_custom_target(copy_fd_libraries ALL COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/*.so** ${CMAKE_CURRENT_BINARY_DIR}/*.dylib** ${PROJECT_SOURCE_DIR}/python/fastdeploy/libs/ DEPENDS ${PY_LIBRARY_NAME})
else()
add_custom_target(copy_fd_libraries ALL COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/*.so* ${PROJECT_SOURCE_DIR}/fastdeploy/libs/ DEPENDS ${PY_LIBRARY_NAME})
add_custom_target(copy_fd_libraries ALL COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/*.so* ${PROJECT_SOURCE_DIR}/python/fastdeploy/libs/ DEPENDS ${PY_LIBRARY_NAME})
endif()
add_custom_target(copy_third_libraries ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/third_libs/install ${PROJECT_SOURCE_DIR}/fastdeploy/libs/third_libs DEPENDS ${PY_LIBRARY_NAME})
add_custom_target(copy_third_libraries ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/third_libs/install ${PROJECT_SOURCE_DIR}/python/fastdeploy/libs/third_libs DEPENDS ${PY_LIBRARY_NAME})
endif(BUILD_FASTDEPLOY_PYTHON)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

Some files were not shown because too many files have changed in this diff Show More