Enabled nlohmann_json from system
This commit is contained in:
parent
bdbc7804af
commit
69bafd3519
@ -140,8 +140,13 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cnpy")
|
||||
add_subdirectory(thirdparty/cnpy EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/json")
|
||||
add_subdirectory(thirdparty/json EXCLUDE_FROM_ALL)
|
||||
if(NOT TARGET nlohmann_json::nlohmann_json)
|
||||
find_package(nlohmann_json QUIET)
|
||||
if(nlohmann_json_FOUND)
|
||||
message(STATUS "nlohmann_json (${nlohmann_json_VERSION}) is found at ${nlohmann_json_DIR}")
|
||||
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/nlohmann_json")
|
||||
add_subdirectory(thirdparty/json EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/common/utils")
|
||||
|
@ -14,7 +14,9 @@ add_subdirectory(common)
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(frontends)
|
||||
# TODO: remove ngraph/ngraph.hpp usage
|
||||
add_subdirectory(core/tests)
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(core/tests)
|
||||
endif()
|
||||
add_subdirectory(bindings)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@ -7,7 +7,10 @@ if(ENABLE_LTO)
|
||||
endif()
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(tests)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
add_subdirectory(onnx)
|
||||
|
15
thirdparty/CMakeLists.txt
vendored
15
thirdparty/CMakeLists.txt
vendored
@ -157,18 +157,13 @@ endif()
|
||||
# nlohmann json
|
||||
#
|
||||
|
||||
# find_package(nlohmann_json QUIET)
|
||||
# if(nlohmann_json_FOUND)
|
||||
# nlohmann_json::nlohmann_json
|
||||
# else()
|
||||
add_subdirectory(json)
|
||||
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)
|
||||
# endif()
|
||||
ov_install_static_lib(nlohmann_json openvino_common)
|
||||
ov_install_static_lib(nlohmann_json_schema_validator openvino_common)
|
||||
|
||||
#
|
||||
# Install
|
||||
|
Loading…
Reference in New Issue
Block a user