Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / samples / hello_shape_infer_ssd / 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 set(TARGET_NAME "hello_shape_infer_ssd")
16
17 file(GLOB SRC
18         ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
19         )
20
21 file(GLOB HEADERS
22         ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
23         )
24
25 # Find OpenCV components if exist
26 find_package(OpenCV COMPONENTS imgcodecs QUIET)
27 if(NOT(OpenCV_FOUND))
28     message(WARNING "OPENCV is disabled or not found, " ${TARGET_NAME} " skipped")
29     return()
30 endif()
31
32 # Create named folders for the sources within the .vcproj
33 # Empty name lists them directly under the .vcproj
34 source_group("src" FILES ${SRC})
35 source_group("headers" FILES ${HEADERS})
36
37 link_directories(${LIB_FOLDER})
38
39 # Create library file from sources.
40 add_executable(${TARGET_NAME} ${SRC} ${HEADERS})
41
42 set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME})
43
44 target_link_libraries(${TARGET_NAME} ${InferenceEngine_LIBRARIES} IE::ie_cpu_extension ${OpenCV_LIBRARIES})
45
46 if (UNIX)
47     target_link_libraries(${TARGET_NAME} ${LIB_DL})
48 endif ()