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.
28 lines
547 B
28 lines
547 B
cmake_minimum_required(VERSION 3.5) |
|
|
|
project(Yolov8CPPInference VERSION 0.1) |
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
|
|
|
# CUDA |
|
set(CUDA_TOOLKIT_ROOT_DIR "/usr/local/cuda") |
|
find_package(CUDA 11 REQUIRED) |
|
|
|
set(CMAKE_CUDA_STANDARD 11) |
|
set(CMAKE_CUDA_STANDARD_REQUIRED ON) |
|
# !CUDA |
|
|
|
# OpenCV |
|
find_package(OpenCV REQUIRED) |
|
include_directories(${OpenCV_INCLUDE_DIRS}) |
|
# !OpenCV |
|
|
|
set(PROJECT_SOURCES |
|
main.cpp |
|
|
|
inference.h |
|
inference.cpp |
|
) |
|
|
|
add_executable(Yolov8CPPInference ${PROJECT_SOURCES}) |
|
target_link_libraries(Yolov8CPPInference ${OpenCV_LIBS})
|
|
|