You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1010 B
29 lines
1010 B
|
11 months ago
|
SET(ArithTrkPubInc ${CMAKE_SOURCE_DIR}/public_include)
|
||
|
|
include_directories(${ArithTrkPubInc}) #引入算法公共头文件
|
||
|
|
|
||
|
|
set(ArithSrcDIR_MAIN "src") #库源文件路径
|
||
|
|
include_directories(${ArithSrcDIR_MAIN}) #设置头文件包含
|
||
|
|
include_directories(${OpenCV_INCLUDE_DIRS})
|
||
|
|
add_definitions(-fvisibility=hidden)
|
||
|
|
|
||
|
|
find_package(Threads)
|
||
|
|
|
||
|
|
# setup CUDA
|
||
|
|
find_package(CUDA REQUIRED)
|
||
|
|
message(STATUS " libraries: ${CUDA_LIBRARIES}")
|
||
|
|
message(STATUS " include path: ${CUDA_INCLUDE_DIRS}")
|
||
|
|
|
||
|
|
include_directories(${CUDA_INCLUDE_DIRS})
|
||
|
|
include_directories(${TRT_DIR}/include)
|
||
|
|
|
||
|
|
file(GLOB libsrcs ${ArithSrcDIR_MAIN}/*.cpp ${ArithSrcDIR_MAIN}/*.c ${ArithSrcDIR_MAIN}/*.h ${ArithSrcDIR_MAIN}/*.hpp)
|
||
|
|
|
||
|
|
#算法库源文件添加
|
||
|
|
add_library(${LIB_Arith_AIDET_NAME} SHARED ${libsrcs}) #构建算法库
|
||
|
|
target_link_libraries(${LIB_Arith_AIDET_NAME}
|
||
|
|
${OpenCV_LIBS}
|
||
|
|
${CUDA_LIBRARIES}
|
||
|
|
${TRT_DIR}/lib/nvinfer_10.lib
|
||
|
|
Threads::Threads)
|
||
|
|
|
||
|
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/Bin) #输出算法库路径
|