Use nlohmann_jsonConfig from system
This commit is contained in:
@@ -10,7 +10,7 @@ file (GLOB HDR ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
|
||||
ie_add_sample(NAME ${TARGET_NAME}
|
||||
SOURCES ${SRC}
|
||||
HEADERS ${HDR}
|
||||
DEPENDENCIES nlohmann_json format_reader ie_samples_utils)
|
||||
DEPENDENCIES nlohmann_json::nlohmann_json format_reader ie_samples_utils)
|
||||
|
||||
# Optional OpenCL dependnency
|
||||
|
||||
@@ -63,7 +63,6 @@ endif()
|
||||
find_package(OpenCV COMPONENTS core QUIET)
|
||||
if(NOT OpenCV_FOUND)
|
||||
message(WARNING "OpenCV is disabled or not found, ${TARGET_NAME} will be built without OpenCV support. Set OpenCV_DIR")
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE nlohmann_json_schema_validator)
|
||||
else()
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE USE_OPENCV)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE opencv_core)
|
||||
|
||||
@@ -21,7 +21,7 @@ add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC openvino::runtime::dev
|
||||
PRIVATE openvino::itt pugixml::static openvino::runtime ngraph::reference
|
||||
nlohmann_json_schema_validator nlohmann_json)
|
||||
nlohmann_json_schema_validator)
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${PUBLIC_HEADERS_DIR}
|
||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
|
||||
@@ -17,7 +17,7 @@ target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC engines_test_util openvino::runtime
|
||||
offline_transformations cnpy commonTestUtils ngraph_test_util openvino::util
|
||||
nlohmann_json_schema_validator test_builtin_extensions_1 test_builtin_extensions_2)
|
||||
nlohmann_json::nlohmann_json test_builtin_extensions_1 test_builtin_extensions_2)
|
||||
|
||||
target_compile_definitions(${TARGET_NAME}
|
||||
PRIVATE
|
||||
|
||||
@@ -7,7 +7,7 @@ set(TARGET_NAME "test_builtin_extensions_1")
|
||||
file(GLOB LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
file(GLOB LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
|
||||
|
||||
set(DEPENDENCIES nlohmann_json openvino::runtime::dev offline_transformations)
|
||||
set(DEPENDENCIES openvino::runtime::dev offline_transformations)
|
||||
set(DEFINITIONS)
|
||||
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <extension/json_transformation.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <openvino/frontend/node_context.hpp>
|
||||
|
||||
class TestExtension1 : public ov::frontend::JsonTransformationExtension {
|
||||
|
||||
@@ -10,8 +10,7 @@ file(GLOB_RECURSE LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
|
||||
# Create library
|
||||
add_library(${TARGET_NAME} SHARED ${LIBRARY_SRC} ${LIBRARY_HEADERS})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE nlohmann_json openvino::runtime::dev
|
||||
offline_transformations)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime::dev offline_transformations)
|
||||
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <extension/json_transformation.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
class TestExtension1 : public ov::frontend::JsonTransformationExtension {
|
||||
public:
|
||||
|
||||
17
thirdparty/CMakeLists.txt
vendored
17
thirdparty/CMakeLists.txt
vendored
@@ -46,7 +46,7 @@ endif()
|
||||
|
||||
if(ENABLE_SYSTEM_PUGIXML)
|
||||
find_package(PugiXML REQUIRED)
|
||||
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
|
||||
set_target_properties(pugixml PROPERTIES IMPORTED_GLOBAL ON)
|
||||
add_library(pugixml::static ALIAS pugixml)
|
||||
else()
|
||||
function(ie_build_pugixml)
|
||||
@@ -157,13 +157,18 @@ endif()
|
||||
# nlohmann json
|
||||
#
|
||||
|
||||
add_subdirectory(json)
|
||||
# find_package(nlohmann_json QUIET)
|
||||
# if(nlohmann_json_FOUND)
|
||||
# nlohmann_json::nlohmann_json
|
||||
# else()
|
||||
add_subdirectory(json)
|
||||
|
||||
openvino_developer_export_targets(COMPONENT openvino_common
|
||||
TARGETS nlohmann_json nlohmann_json_schema_validator)
|
||||
openvino_developer_export_targets(COMPONENT openvino_common
|
||||
TARGETS nlohmann_json nlohmann_json_schema_validator)
|
||||
|
||||
ov_install_static_lib(nlohmann_json openvino_common)
|
||||
ov_install_static_lib(nlohmann_json_schema_validator openvino_common)
|
||||
ov_install_static_lib(nlohmann_json openvino_common)
|
||||
ov_install_static_lib(nlohmann_json_schema_validator openvino_common)
|
||||
# endif()
|
||||
|
||||
#
|
||||
# Install
|
||||
|
||||
@@ -32,7 +32,6 @@ target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime format_reader gfl
|
||||
find_package(OpenCV COMPONENTS core QUIET)
|
||||
if(NOT OpenCV_FOUND)
|
||||
message(WARNING "OpenCV is disabled or not found, ${TARGET_NAME} will be built without OpenCV support. Set OpenCV_DIR")
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE nlohmann_json_schema_validator)
|
||||
else()
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE USE_OPENCV)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE opencv_core)
|
||||
|
||||
Reference in New Issue
Block a user