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