mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* simplify deps management * skip visibility flags for MSVC * simplify cuda deps * naming * workaround for cmake<3.17 * add spdlog dependency * move the enablement of CUDA to top level CMakeLists.txt * fix MSVC build * fix lint * fix build for backend ops only * remove comment * allow to use apis/python as a standalone project * remove redundant cmake code * control shared or static lib using `MMDEPLOY_SHARED_LIBS` instead of `BUILD_SHARED_LIBS` * fix MSVC build * update docs
25 lines
718 B
CMake
25 lines
718 B
CMake
# Copyright (c) OpenMMLab. All rights reserved.
|
|
|
|
project(mmdeploy_cuda_transform_impl CUDA CXX)
|
|
|
|
find_package(pplcv REQUIRED)
|
|
|
|
set(SRCS
|
|
crop_impl.cpp
|
|
image2tensor_impl.cpp
|
|
default_format_bundle_impl.cpp
|
|
load_impl.cpp
|
|
normalize_impl.cpp
|
|
pad_impl.cpp
|
|
resize_impl.cpp
|
|
cast.cu
|
|
crop.cu
|
|
normalize.cu
|
|
transpose.cu)
|
|
mmdeploy_add_module(${PROJECT_NAME} "${SRCS}")
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
|
mmdeploy::transform ${PPLCV_LIBRARIES})
|
|
target_include_directories(${PROJECT_NAME}
|
|
PRIVATE ${CUDA_TOOLKIT_ROOT_DIR}/include ${PPLCV_INCLUDE_DIRS})
|
|
add_library(mmdeploy::transform_impl::cuda ALIAS ${PROJECT_NAME})
|