From b85e140c3e4a7a7ccba59abfc67b63aac7a28dd9 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期五, 17 五月 2024 17:28:56 +0800
Subject: [PATCH] update
---
runtime/onnxruntime/CMakeLists.txt | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/runtime/onnxruntime/CMakeLists.txt b/runtime/onnxruntime/CMakeLists.txt
index ab0e842..d8e623e 100644
--- a/runtime/onnxruntime/CMakeLists.txt
+++ b/runtime/onnxruntime/CMakeLists.txt
@@ -18,14 +18,25 @@
message("Little endian system")
endif()
+# json
+include(FetchContent)
+if(NOT EXISTS ${PROJECT_SOURCE_DIR}/third_party/json/ChangeLog.md )
+FetchContent_Declare(json
+ URL https://github.com/nlohmann/json/archive/refs/tags/v3.11.2.tar.gz
+SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/json
+)
+
+FetchContent_MakeAvailable(json)
+endif()
+
# for onnxruntime
IF(WIN32)
-# file(REMOVE ${PROJECT_SOURCE_DIR}/third_party/glog/src/config.h
-# ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/export.h
-# ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/logging.h
-# ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/raw_logging.h
-# ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/stl_logging.h
-# ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/vlog_is_on.h)
+ file(REMOVE ${PROJECT_SOURCE_DIR}/third_party/glog/src/config.h
+ ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/export.h
+ ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/logging.h
+ ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/raw_logging.h
+ ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/stl_logging.h
+ ${PROJECT_SOURCE_DIR}/third_party/glog/src/glog/vlog_is_on.h)
ELSE()
link_directories(${ONNXRUNTIME_DIR}/lib)
link_directories(${FFMPEG_DIR}/lib)
@@ -36,6 +47,7 @@
include_directories(${PROJECT_SOURCE_DIR}/third_party/jieba/include)
include_directories(${PROJECT_SOURCE_DIR}/third_party/jieba/include/limonp/include)
include_directories(${PROJECT_SOURCE_DIR}/third_party/kaldi)
+include_directories(${PROJECT_SOURCE_DIR}/third_party/json/include)
if(ENABLE_GLOG)
include_directories(${PROJECT_SOURCE_DIR}/third_party/glog/src)
--
Gitblit v1.9.1