1 # Copyright (C) 2018-2019 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
5 set (TARGET_NAME "test_validation_app")
7 # Find OpenCV components if exist
8 find_package(OpenCV COMPONENTS imgcodecs)
10 message(WARNING "No suitable OpenCV version detected, " ${TARGET_NAME} " skipped")
14 set(VALIDATION_APP_SOURCE "${IE_MAIN_SOURCE_DIR}/samples/validation_app")
17 ${VALIDATION_APP_SOURCE}/*.cpp
18 ${VALIDATION_APP_SOURCE}/pugixml/*.cpp
21 file (GLOB MAIN_HEADERS
22 ${VALIDATION_APP_SOURCE}/*.hpp
23 ${VALIDATION_APP_SOURCE}/pugixml/*.hpp
26 # Create named folders for the sources within the .vcproj
27 # Empty name lists them directly under the .vcproj
28 source_group("src" FILES ${MAIN_SRC})
29 source_group("include" FILES ${MAIN_HEADERS})
32 if(NOT "${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
33 message(FATAL_ERROR "Only 64-bit supported on Windows")
35 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SCL_SECURE_NO_WARNINGS -DNOMINMAX")
38 # Properties->C/C++->General->Additional Include Directories
39 include_directories (${VALIDATION_APP_SOURCE}/../classification_sample/core
40 ${VALIDATION_APP_SOURCE}/../common
41 ${VALIDATION_APP_SOURCE}/../common/os/windows
42 ${VALIDATION_APP_SOURCE}/../../include)
44 # Create library file from sources.
46 list(REMOVE_ITEM MAIN_SRC ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
48 add_library(${TARGET_NAME} STATIC ${MAIN_SRC} ${MAIN_HEADERS})
49 set_target_properties(${TARGET_NAME} PROPERTIES "COMPILE_PDB_NAME" ${TARGET_NAME})
50 target_link_libraries(${TARGET_NAME} gflags ie_cpu_extension ${OpenCV_LIBRARIES})