2
0
ruki 2 жил өмнө
parent
commit
803d0f7396
1 өөрчлөгдсөн 15 нэмэгдсэн , 1 устгасан
  1. 15 1
      README.md

+ 15 - 1
README.md

@@ -110,6 +110,19 @@ option "cxx_constexpr"
     add_cxxsnippets "constexpr int k = 0;"
 option_end
 
+option "lua"
+    add_cfuncs "lua_pushstring"
+    add_cincludes "lua.h" "lualib.h" "lauxlib.h"
+    before_check "option_find_lua"
+option_end
+
+option_find_lua() {
+    option "lua"
+        add_cxflags `pkg-config --cflags lua5.4 2>/dev/null`
+        add_ldflags `pkg-config --libs lua5.4 2>/dev/null`
+    option_end
+}
+
 set_warnings "all" "error"
 set_languages "c99" "c++11"
 if is_mode "debug"; then
@@ -131,7 +144,8 @@ target "demo"
     add_headerfiles "${buildir}/include/config.h" "hello"
     add_headerfiles "(bar/*.h)" "hello"
     add_headerfiles "foo/(*.h)" "hello"
-    add_installfiles "res/(png/*.png)" "share"
+    add_installfiles "res/(png/**.png)" "share"
+    add_options "lua"
     if has_config "debug"; then
         add_defines "DEBUG" "TEST"
     fi