1 # Copyright (C) 2018 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
5 cmake_minimum_required(VERSION 2.8)
7 set (TARGET_NAME "validation_app")
10 ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
11 ${CMAKE_CURRENT_SOURCE_DIR}/pugixml/*.cpp
14 file (GLOB MAIN_HEADERS
15 ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
16 ${CMAKE_CURRENT_SOURCE_DIR}/pugixml/*.hpp
19 # Create named folders for the sources within the .vcproj
20 # Empty name lists them directly under the .vcproj
21 source_group("src" FILES ${MAIN_SRC})
22 source_group("include" FILES ${MAIN_HEADERS})
24 # Find OpenCV components if exist
25 find_package(OpenCV COMPONENTS imgcodecs QUIET)
27 message(WARNING "OPENCV is disabled or not found, " ${TARGET_NAME} " skipped")
31 # Properties->C/C++->General->Additional Include Directories
32 include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../classification_sample/core
33 ${CMAKE_CURRENT_SOURCE_DIR}/../common
34 ${CMAKE_CURRENT_SOURCE_DIR}/../common/os/windows
35 ${CMAKE_CURRENT_SOURCE_DIR}/../../include)
37 link_directories(${LIB_FOLDER})
39 # Create library file from sources.
40 add_executable(${TARGET_NAME} ${MAIN_SRC} ${MAIN_HEADERS})
42 set_target_properties(${TARGET_NAME} PROPERTIES "CMAKE_CXX_FLAGS" "${CMAKE_CXX_FLAGS} -fPIE"
43 COMPILE_PDB_NAME ${TARGET_NAME})
44 target_link_libraries(${TARGET_NAME} gflags IE::ie_cpu_extension ${InferenceEngine_LIBRARIES} ${OpenCV_LIBRARIES})
46 target_link_libraries(${TARGET_NAME} dl)