Browse Source

add: 关联编译protobuf

Wendal Chen 3 years ago
parent
commit
a7faed760a
2 changed files with 6 additions and 0 deletions
  1. 3 0
      app/port/luat_base_air101.c
  2. 3 0
      xmake.lua

+ 3 - 0
app/port/luat_base_air101.c

@@ -196,6 +196,9 @@ static const luaL_Reg loadedlibs[] = {
 #endif
 #endif
 #ifdef LUAT_USE_MINIZ
 #ifdef LUAT_USE_MINIZ
   {"miniz", luaopen_miniz},
   {"miniz", luaopen_miniz},
+#endif
+#ifdef LUAT_USE_PROTOBUF
+  {"protobuf", luaopen_protobuf},
 #endif
 #endif
   {NULL, NULL}
   {NULL, NULL}
 };
 };

+ 3 - 0
xmake.lua

@@ -385,6 +385,9 @@ target("air10x")
     
     
     add_includedirs(luatos.."components/mempool/tlsf3")
     add_includedirs(luatos.."components/mempool/tlsf3")
     add_files(luatos.."components/mempool/tlsf3/*.c")
     add_files(luatos.."components/mempool/tlsf3/*.c")
+    
+    add_includedirs(luatos.."components/serialization/protobuf")
+    add_files(luatos.."components/serialization/protobuf/*.c")
 
 
 	after_build(function(target)
 	after_build(function(target)
         sdk_dir = target:toolchains()[1]:sdkdir().."/"
         sdk_dir = target:toolchains()[1]:sdkdir().."/"