* Add nlohmann json (Release 3.10.4) as submodule * Move nlohmann_json lib to json folder, add json_schema validator lib as submodule * Move BUILD_SHARED_LIBS flag to a separete scope * Add export of nlohmann_json_schema_validator * Fix build * set folder thirdparty * link lib to offline_transformations and benchmark_app * suppress shadowing names warning in nlohmann_json lib * fix include in benchmark_app * Resolve review comments: add json subdirs to samples cmake * Fix static build * Proper json integration * removed cpp_samples_deps component Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
73 lines
1.8 KiB
CMake
73 lines
1.8 KiB
CMake
# Copyright (C) 2021 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
add_subdirectory(cpp)
|
|
add_subdirectory(c)
|
|
|
|
# used by tests_deprecated
|
|
if(TARGET format_reader)
|
|
install(TARGETS format_reader
|
|
RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT tests EXCLUDE_FROM_ALL
|
|
LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT tests EXCLUDE_FROM_ALL)
|
|
endif()
|
|
|
|
openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader ie_samples_utils)
|
|
|
|
#
|
|
# Install
|
|
#
|
|
|
|
# install C++ samples
|
|
|
|
ie_cpack_add_component(cpp_samples DEPENDS core_dev)
|
|
|
|
if(UNIX)
|
|
install(DIRECTORY cpp/
|
|
DESTINATION samples/cpp
|
|
COMPONENT cpp_samples
|
|
USE_SOURCE_PERMISSIONS
|
|
PATTERN *.bat EXCLUDE
|
|
PATTERN .clang-format EXCLUDE)
|
|
elseif(WIN32)
|
|
install(DIRECTORY cpp/
|
|
DESTINATION samples/cpp
|
|
COMPONENT cpp_samples
|
|
USE_SOURCE_PERMISSIONS
|
|
PATTERN *.sh EXCLUDE
|
|
PATTERN .clang-format EXCLUDE)
|
|
endif()
|
|
|
|
# install C samples
|
|
|
|
ie_cpack_add_component(c_samples DEPENDS core_c)
|
|
|
|
if(UNIX)
|
|
install(PROGRAMS cpp/build_samples.sh
|
|
DESTINATION samples/c
|
|
COMPONENT c_samples)
|
|
elseif(WIN32)
|
|
install(PROGRAMS cpp/build_samples_msvc.bat
|
|
DESTINATION samples/c
|
|
COMPONENT c_samples)
|
|
endif()
|
|
|
|
install(DIRECTORY c
|
|
DESTINATION samples
|
|
COMPONENT c_samples
|
|
PATTERN c/CMakeLists.txt EXCLUDE
|
|
PATTERN c/.clang-format EXCLUDE)
|
|
|
|
install(FILES cpp/CMakeLists.txt
|
|
DESTINATION samples/c
|
|
COMPONENT c_samples)
|
|
|
|
# install Python samples
|
|
|
|
ie_cpack_add_component(python_samples)
|
|
|
|
install(DIRECTORY python/
|
|
DESTINATION samples/python
|
|
USE_SOURCE_PERMISSIONS
|
|
COMPONENT python_samples)
|