Publishing R5 content (#72)
[platform/upstream/dldt.git] / inference-engine / samples / hello_autoresize_classification / CMakeLists.txt
1 # Copyright (C) 2018 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
3 #
4
5 cmake_minimum_required(VERSION 2.8)
6
7 set (TARGET_NAME "hello_autoresize_classification")
8
9 file (GLOB SRC
10         ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
11         )
12
13 # Find OpenCV components if exist
14 find_package(OpenCV COMPONENTS imgcodecs QUIET)
15 if(NOT(OpenCV_FOUND))
16     message(WARNING "OPENCV is disabled or not found, " ${TARGET_NAME} " skipped")
17     return()
18 endif()
19
20 source_group("src" FILES ${SRC})
21
22 link_directories(${LIB_FOLDER})
23
24 # Create library file from sources.
25 add_executable(${TARGET_NAME} ${SRC})
26
27 set_target_properties(${TARGET_NAME} PROPERTIES "CMAKE_CXX_FLAGS" "${CMAKE_CXX_FLAGS} -fPIE"
28                       COMPILE_PDB_NAME ${TARGET_NAME})
29
30
31 target_link_libraries(${TARGET_NAME} ${InferenceEngine_LIBRARIES} ${OpenCV_LIBRARIES})
32
33 if(UNIX)
34     target_link_libraries(${TARGET_NAME} ${LIB_DL})
35 endif()