forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (48 loc) · 1.9 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
# minimum required cmake version: 3.1.0
cmake_minimum_required(VERSION 3.1.0)
project(RealSenseVinoFaceExample)
# OpenCV is required here
if(NOT DEFINED OpenCV_DIR OR NOT IS_DIRECTORY ${OpenCV_DIR})
set(OpenCV_DIR "" CACHE PATH "The path to the OpenCV Toolkit build directory")
message( FATAL_ERROR "OpenVINO examples require OpenCV; specify OpenCV_DIR" )
endif()
find_package(OpenCV REQUIRED)
get_property(deps VARIABLE PROPERTY DEPENDENCIES)
set(DEPENDENCIES ${deps} ${OpenCV_LIBS})
include_directories( ../../opencv )
add_executable(rs-face-vino
rs-face-vino.cpp
${OPENVINO_FILES}
${ELPP_FILES}
)
if(OPENVINO2019)
target_compile_definitions(rs-face-vino PRIVATE OPENVINO2019)
endif()
if(OPENVINO_NGRAPH)
target_compile_definitions(rs-face-vino PRIVATE OPENVINO_NGRAPH)
endif()
source_group("OpenVINO" FILES ${OPENVINO_FILES})
source_group("EasyLogging++" FILES ${ELPP_FILES})
set_property(TARGET rs-face-vino PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-face-vino ${DEPENDENCIES})
set_target_properties (rs-face-vino PROPERTIES
FOLDER "Examples/openvino"
)
install(
TARGETS
rs-face-vino
RUNTIME DESTINATION
${CMAKE_INSTALL_PREFIX}/bin
)
# Download model files -- these will go into build/wrappers/openvino/face, which is also where the sample
# is run from in Visual Studio
if(OPENVINO2019)
dl_vino_model( "README.txt" "789e144d6cafa379c8437d2a6860829b6d935a8d" )
dl_vino_model( "face-detection-adas-0001.bin" "1625f05ada1d8e78e36856def7124f78cd0a6c2a" )
dl_vino_model( "face-detection-adas-0001.xml" "11c36f6e4488b2f5437ccff9f330d02545087ab3" )
else()
# Newer model files with IRv10, 2020.1 and later
dl_vino_model( "README.txt" "789e144d6cafa379c8437d2a6860829b6d935a8d" )
dl_vino_model( "face-detection-adas-0001.bin" "065e9015297c7adbc650ebfc17176477cd0a4279" )
dl_vino_model( "face-detection-adas-0001.xml" "331be642a248213f586ec1d1b71c223435a437e3" )
endif()