Publishing 2019 R3 content
[platform/upstream/dldt.git] / inference-engine / tools / vpu / vpu_compile / CMakeLists.txt
1 # Copyright (C) 2018-2019 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 find_package(Threads REQUIRED)
16
17 set(TARGET_NAME myriad_compile)
18
19 file(GLOB SRCS
20     ${CMAKE_SOURCE_DIR}/tools/vpu/common/*.cpp
21     ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
22 )
23
24 add_executable(${TARGET_NAME} ${SRCS})
25
26 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
27     target_compile_options(${TARGET_NAME} PRIVATE
28         "-Wall"
29     )
30 endif()
31
32 target_include_directories(${TARGET_NAME} SYSTEM PRIVATE
33     ${CMAKE_SOURCE_DIR}/samples/common
34     ${CMAKE_SOURCE_DIR}/include
35     ${CMAKE_SOURCE_DIR}/tools/vpu/common
36     ${CMAKE_SOURCE_DIR}/src/inference_engine
37 )
38
39 target_link_libraries(${TARGET_NAME} PRIVATE
40     ${CMAKE_DL_LIBS}
41     Threads::Threads
42     inference_engine vpu_graph_transformer
43     gflags
44 )
45
46 add_dependencies(${TARGET_NAME} myriadPlugin)
47
48 set_target_properties(${TARGET_NAME} PROPERTIES
49     COMPILE_PDB_NAME
50     ${TARGET_NAME}
51 )
52
53 add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME})