forked from floratest1/SpireCV
update CMakeLists.txt.
Signed-off-by: jario-jin <jariof@foxmail.com>
This commit is contained in:
parent
ebcea72d13
commit
ae3509f836
|
@ -8,7 +8,7 @@ add_definitions(-DAPI_EXPORTS)
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
|
|
||||||
|
|
||||||
## JETSON, X86_CUDA
|
## JETSON, X86_CUDA, X86_INTEL
|
||||||
message(STATUS "System:${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
message(STATUS "System:${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||||
if(NOT DEFINED PLATFORM)
|
if(NOT DEFINED PLATFORM)
|
||||||
message(FATAL_ERROR "PLATFORM NOT SPECIFIED!")
|
message(FATAL_ERROR "PLATFORM NOT SPECIFIED!")
|
||||||
|
@ -185,7 +185,7 @@ list(APPEND spirecv_SRCS ${ALG_SRC_FILES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(USE_CUDA)
|
if(USE_CUDA) # PLATFORM_X86_CUDA & PLATFORM_JETSON
|
||||||
# CUDA
|
# CUDA
|
||||||
include_directories(/usr/local/cuda/include)
|
include_directories(/usr/local/cuda/include)
|
||||||
link_directories(/usr/local/cuda/lib64)
|
link_directories(/usr/local/cuda/lib64)
|
||||||
|
@ -197,24 +197,11 @@ if(USE_CUDA)
|
||||||
target_link_libraries(sv_yoloplugins nvinfer cudart)
|
target_link_libraries(sv_yoloplugins nvinfer cudart)
|
||||||
|
|
||||||
cuda_add_library(sv_world SHARED ${spirecv_SRCS})
|
cuda_add_library(sv_world SHARED ${spirecv_SRCS})
|
||||||
if(USE_GSTREAMER)
|
|
||||||
target_link_libraries(
|
|
||||||
sv_world ${OpenCV_LIBS}
|
|
||||||
sv_yoloplugins sv_gimbal
|
|
||||||
nvinfer cudart
|
|
||||||
gstrtspserver-1.0
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
sv_world ${OpenCV_LIBS}
|
sv_world ${OpenCV_LIBS}
|
||||||
sv_yoloplugins sv_gimbal
|
sv_yoloplugins sv_gimbal
|
||||||
nvinfer cudart
|
nvinfer cudart
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
||||||
if(USE_FFMPEG)
|
|
||||||
target_link_libraries(sv_world ${FFMPEG_LIBS} fmt)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(
|
set(
|
||||||
YOLO_SRCS
|
YOLO_SRCS
|
||||||
|
@ -230,19 +217,21 @@ if(USE_CUDA)
|
||||||
cuda_add_executable(SpireCVSeg samples/SpireCVSeg.cpp ${YOLO_SRCS})
|
cuda_add_executable(SpireCVSeg samples/SpireCVSeg.cpp ${YOLO_SRCS})
|
||||||
target_link_libraries(SpireCVSeg sv_world)
|
target_link_libraries(SpireCVSeg sv_world)
|
||||||
|
|
||||||
elseif(PLATFORM STREQUAL "X86_INTEL")
|
elseif(PLATFORM STREQUAL "X86_INTEL") # Links to Intel-OpenVINO libraries here
|
||||||
add_library(sv_world SHARED ${spirecv_SRCS})
|
add_library(sv_world SHARED ${spirecv_SRCS})
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
sv_world ${OpenCV_LIBS}
|
sv_world ${OpenCV_LIBS}
|
||||||
sv_gimbal
|
sv_gimbal
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(USE_GSTREAMER)
|
if(USE_GSTREAMER)
|
||||||
target_link_libraries(sv_world gstrtspserver-1.0)
|
target_link_libraries(sv_world gstrtspserver-1.0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_FFMPEG)
|
if(USE_FFMPEG)
|
||||||
target_link_libraries(sv_world ${FFMPEG_LIBS} fmt)
|
target_link_libraries(sv_world ${FFMPEG_LIBS} fmt)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
#demo
|
#demo
|
||||||
add_executable(ArucoDetection samples/demo/aruco_detection.cpp)
|
add_executable(ArucoDetection samples/demo/aruco_detection.cpp)
|
||||||
|
|
Loading…
Reference in New Issue