blob: b47a25409eb842ade9d04dd39cea7b5ff0bab849 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ebf359..8562715 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,7 @@ option(BUILD_STATIC_LIBS "Build a static libjsonnet." ON)
option(BUILD_SHARED_BINARIES "Link binaries to the shared libjsonnet instead of the static one." OFF)
option(USE_SYSTEM_GTEST "Use system-provided gtest library" OFF)
option(USE_SYSTEM_JSON "Use the system-provided json library" OFF)
+option(USE_SYSTEM_RYML "Use the system-provided rapidyaml library" OFF)
# TODO: Support using a system Rapid YAML install.
set(GLOBAL_OUTPUT_PATH_SUFFIX "" CACHE STRING
"Output artifacts directory.")
@@ -104,6 +105,11 @@ if(USE_SYSTEM_JSON)
else()
add_subdirectory(third_party/json)
endif()
+if(USE_SYSTEM_RYML)
+ find_package(ryml CONFIG REQUIRED)
+else()
+ add_subdirectory(third_party/rapidyaml/rapidyaml ryml)
+endif()
# Look for libraries in global output path.
link_directories(${GLOBAL_OUTPUT_PATH})
@@ -125,7 +131,6 @@ endif()
add_subdirectory(include)
add_subdirectory(stdlib)
add_subdirectory(third_party/md5)
-add_subdirectory(third_party/rapidyaml)
add_subdirectory(core)
add_subdirectory(cpp)
add_subdirectory(cmd)
diff --git a/core/vm.cpp b/core/vm.cpp
index faf6d54..f14ddbe 100644
--- a/core/vm.cpp
+++ b/core/vm.cpp
@@ -30,7 +30,8 @@ limitations under the License.
#include <nlohmann/json.hpp>
#include "md5.h"
#include "parser.h"
-#include "ryml_all.hpp"
+#include "ryml/ryml.hpp"
+#include "ryml/ryml_std.hpp"
#include "state.h"
#include "static_analysis.h"
#include "string_utils.h"
|