-
Notifications
You must be signed in to change notification settings - Fork 14
/
CMakeLists.txt
69 lines (57 loc) · 2.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cmake_minimum_required(VERSION 3.10)
project(sophon-stream)
set(CMAKE_CXX_STANDARD 17)
if (NOT DEFINED TARGET_ARCH)
set(TARGET_ARCH pcie)
endif()
if (${TARGET_ARCH} STREQUAL "soc")
if (NOT DEFINED SOPHON_SDK_SOC)
message(FATAL_ERROR "Please set SOPHON_SDK_SOC for building soc")
endif()
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build/lib)
add_subdirectory(framework)
set(PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
message("PROJECT_ROOT = ${PROJECT_ROOT}")
function (checkAndAddElement dir)
if(EXISTS "${PROJECT_ROOT}/${dir}" AND IS_DIRECTORY "${PROJECT_ROOT}/${dir}")
add_subdirectory(${dir})
endif()
endfunction()
function (checkAndAddSample dir)
if(EXISTS "${PROJECT_ROOT}/${dir}" AND IS_DIRECTORY "${PROJECT_ROOT}/${dir}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_ROOT}/${dir}/build)
add_subdirectory(${dir})
endif()
endfunction()
checkAndAddElement(element/algorithm/posec3d)
checkAndAddElement(element/algorithm/fastpose)
checkAndAddElement(element/algorithm/yolox)
checkAndAddElement(element/algorithm/yolov5)
checkAndAddElement(element/algorithm/yolov7)
checkAndAddElement(element/algorithm/bytetrack)
checkAndAddElement(element/algorithm/resnet)
checkAndAddElement(element/algorithm/openpose)
checkAndAddElement(element/algorithm/retinaface)
checkAndAddElement(element/algorithm/lprnet)
checkAndAddElement(element/algorithm/ppocr)
checkAndAddElement(element/algorithm/yolov8)
checkAndAddElement(element/multimedia/decode)
checkAndAddElement(element/multimedia/osd)
checkAndAddElement(element/multimedia/encode)
checkAndAddElement(element/tools/blank)
checkAndAddElement(element/tools/distributor)
checkAndAddElement(element/tools/converger)
checkAndAddElement(element/tools/http_push)
checkAndAddElement(element/tools/faiss)
checkAndAddElement(element/tools/dwa)
checkAndAddElement(element/tools/dpu)
checkAndAddElement(element/tools/blend)
checkAndAddElement(element/tools/ive)
checkAndAddElement(element/tools/stitch)
checkAndAddElement(element/tools/fisheye)
checkAndAddElement(element/tools/resize)
checkAndAddElement(element/tools/filter)
checkAndAddElement(element/tools/qt_display)
checkAndAddElement(3rdparty/freetype2)
checkAndAddSample(samples)