-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
66 lines (48 loc) · 2.04 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
#
# Copyright (C) 2018-2019 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# ===============================================================================
# Generated file for building library with user generated CPU extensions
#
# Contains implementation of the basic layer methods
#
# Refer to the section "Inference Engine Kernels Extensibility" in
# the OpenVINO Inference Engine Developer Guide
# ===============================================================================
set(InferenceEngine_DIR /opt/intel/openvino/deployment_tools/inference_engine)
set(DASHCAM_SRC ${CMAKE_SOURCE_DIR}/src)
option(USE_BOOST_MODULE OFF)
set(TARGET_NAME "dashcam_cpu_extension")
get_filename_component(CMAKE_PREFIX_PATH "${InferenceEngine_DIR}" ABSOLUTE)
message(STATUS "Looking for inference engine configuration file at: ${CMAKE_PREFIX_PATH}")
find_package(InferenceEngine 1.0)
if (NOT InferenceEngine_FOUND)
message(FATAL_ERROR "Inference Engine was not found")
endif()
file(GLOB_RECURSE SRC *.cpp)
file(GLOB_RECURSE HDR *.hpp)
FIND_DASHCAM_SOURCES()
if(WIN32)
add_definitions(-DIMPLEMENT_INFERENCE_ENGINE_API)
endif()
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
if ("${InferenceEngine_INCLUDE_DIRS}" STREQUAL "")
message(FATAL_ERROR "InferenceEngine_INCLUDE_DIRS was not set!")
endif()
if ("${InferenceEngine_LIBRARIES}" STREQUAL "")
message(FATAL_ERROR "InferenceEngine_LIBRARIES was not set!")
endif()
include_directories (PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/common
${InferenceEngine_INCLUDE_DIRS}
"/opt/intel/openvino/deployment_tools/inference_engine/external/tbb/include"
)
link_directories(
"/opt/intel/openvino/deployment_tools/inference_engine/external/tbb/lib"
)
#enable_omp()
add_library(${TARGET_NAME} SHARED ${SRC} ${HDR})
target_link_libraries(${TARGET_NAME} ${InferenceEngine_LIBRARIES} ${intel_omp_lib} tbb omp)
target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME})
#set_target_cpu_flags(${TARGET_NAME})