@@ -20,16 +20,12 @@ namespace buildcc {
2020
2121void schema_gen_cb (FileGenerator &generator,const BaseTarget &flatc_exe) {
2222 generator.AddPattern (" path_fbs" ," {current_root_dir}/path.fbs" );
23- generator.AddPattern (" custom_generator_fbs" ,
24- " {current_root_dir}/custom_generator.fbs" );
2523 generator.AddPattern (" target_fbs" ," {current_root_dir}/target.fbs" );
2624
2725 generator.AddInput (" {path_fbs}" );
28- generator.AddInput (" {custom_generator_fbs}" );
2926 generator.AddInput (" {target_fbs}" );
3027
3128 generator.AddOutput (" {current_build_dir}/path_generated.h" );
32- generator.AddOutput (" {current_build_dir}/custom_generator_generated.h" );
3329 generator.AddOutput (" {current_build_dir}/target_generated.h" );
3430
3531 generator.AddPatterns ({
@@ -38,13 +34,14 @@ void schema_gen_cb(FileGenerator &generator, const BaseTarget &flatc_exe) {
3834// generator.AddCommand("{flatc_compiler} --help");
3935 generator.AddCommand (" {flatc_compiler} -o {current_build_dir} -I"
4036" {current_root_dir} --gen-object-api"
41- " --cpp {path_fbs} {custom_generator_fbs} { target_fbs}" );
37+ " --cpp {path_fbs} {target_fbs}" );
4238
4339 generator.Build ();
4440}
4541
4642void buildcc_cb (BaseTarget &target,const FileGenerator &schema_gen,
47- const TargetInfo &flatbuffers_ho,const TargetInfo &fmt_ho,
43+ const TargetInfo &flatbuffers_ho,
44+ const TargetInfo &nlohmann_json_ho,const TargetInfo &fmt_ho,
4845const TargetInfo &spdlog_ho,const TargetInfo &cli11_ho,
4946const TargetInfo &taskflow_ho,const TargetInfo &tl_optional_ho,
5047const BaseTarget &tpl) {
@@ -119,6 +116,9 @@ void buildcc_cb(BaseTarget &target, const FileGenerator &schema_gen,
119116// FLATBUFFERS HO
120117 target.Insert (flatbuffers_ho,kInsertOptions );
121118
119+ // NLOHMANN JSON HO
120+ target.Insert (nlohmann_json_ho,kInsertOptions );
121+
122122// FMT HO
123123 target.Insert (fmt_ho,kInsertOptions );
124124
@@ -217,6 +217,12 @@ void BuildBuildCC::Initialize() {
217217TargetEnv (env_.GetTargetRootDir () /" third_party" /" flatbuffers" ,
218218 env_.GetTargetBuildDir ()));
219219
220+ // Nlohmann json HO lib
221+ (void )storage_.Add <TargetInfo>(
222+ kNlohmannJsonHoName , toolchain_,
223+ TargetEnv (env_.GetTargetRootDir () /" third_party" /" json" ,
224+ env_.GetTargetBuildDir ()));
225+
220226// CLI11 HO lib
221227 (void )storage_.Add <TargetInfo>(
222228kCli11HoName , toolchain_,
@@ -268,6 +274,7 @@ void BuildBuildCC::Setup(const ArgToolchainState &state) {
268274auto &flatc_exe =GetFlatc ();
269275auto &schema_gen =GetSchemaGen ();
270276auto &flatbuffers_ho_lib =GetFlatbuffersHo ();
277+ auto &nlohmann_json_ho_lib =GetNlohmannJsonHo ();
271278auto &cli11_ho_lib =GetCli11Ho ();
272279auto &fmt_ho_lib =GetFmtHo ();
273280auto &spdlog_ho_lib =GetSpdlogHo ();
@@ -281,6 +288,7 @@ void BuildBuildCC::Setup(const ArgToolchainState &state) {
281288 .Build (schema_gen_cb, schema_gen, flatc_exe)
282289 .Dep (schema_gen, flatc_exe)
283290 .Func (flatbuffers_ho_cb, flatbuffers_ho_lib)
291+ .Func (nlohmann_json_ho_cb, nlohmann_json_ho_lib)
284292 .Func (cli11_ho_cb, cli11_ho_lib)
285293 .Func (fmt_ho_cb, fmt_ho_lib)
286294 .Func (spdlog_ho_cb, spdlog_ho_lib)
@@ -290,8 +298,8 @@ void BuildBuildCC::Setup(const ArgToolchainState &state) {
290298 .Build (tpl_cb, tpl_lib)
291299 .Func (global_flags_cb, buildcc_lib, toolchain_)
292300 .Build (buildcc_cb, buildcc_lib, schema_gen, flatbuffers_ho_lib,
293- fmt_ho_lib, spdlog_ho_lib, cli11_ho_lib, taskflow_ho_lib ,
294- tl_optional_ho_lib, tpl_lib)
301+ nlohmann_json_ho_lib, fmt_ho_lib, spdlog_ho_lib, cli11_ho_lib,
302+ taskflow_ho_lib, tl_optional_ho_lib, tpl_lib)
295303 .Dep (buildcc_lib, schema_gen)
296304 .Dep (buildcc_lib, tpl_lib);
297305}