Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / samples / hello_request_classification / CMakeLists.txt
1 # Copyright (C) 2018-2019 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
3 #
4
5 set (TARGET_NAME "hello_request_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 # Create named folders for the sources within the .vcproj
19 # Empty name lists them directly under the .vcproj
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
34 if(UNIX)
35     target_link_libraries(${TARGET_NAME} ${LIB_DL} pthread)
36 endif()