Lua: Add Lua and sol2 3rdparty libs to qbs build

Change-Id: I74ad19ccf9243f131539285b883bfad005377897
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Christian Stenger
2024-04-16 09:01:20 +02:00
parent 2af7ac4aab
commit fe7203a57f
3 changed files with 100 additions and 0 deletions

81
src/libs/3rdparty/lua/lua.qbs vendored Normal file
View File

@@ -0,0 +1,81 @@
QtcLibrary {
name: "lua546"
type: "staticlibrary"
cpp.defines: {
var defines = base;
if (qbs.targetOS.contains("windows"))
defines.push("LUA_USE_WINDOWS");
else if (qbs.targetOS.contains("macos"))
defines.push("LUA_USE_MACOSX");
else if (qbs.targetOS.contains("linux"))
defines.push("LUA_USE_LINUX");
return defines;
}
Group {
name: "Sources"
prefix: "src/"
files: [
"lapi.c",
"lapi.h",
"lauxlib.c",
"lauxlib.h",
"lbaselib.c",
"lcode.c",
"lcode.h",
"lcorolib.c",
"lctype.c",
"lctype.h",
"ldblib.c",
"ldebug.c",
"ldebug.h",
"ldo.c",
"ldo.h",
"ldump.c",
"lfunc.c",
"lfunc.h",
"lgc.c",
"lgc.h",
"linit.c",
"liolib.c",
"llex.c",
"llex.h",
"lmathlib.c",
"lmem.c",
"lmem.h",
"loadlib.c",
"lobject.c",
"lobject.h",
"lopcodes.c",
"lopcodes.h",
"loslib.c",
"lparser.c",
"lparser.h",
"lstate.c",
"lstate.h",
"lstring.c",
"lstring.h",
"lstrlib.c",
"ltable.c",
"ltable.h",
"ltablib.c",
"ltm.c",
"ltm.h",
"lua.c",
"lua.h",
"lundump.c",
"lundump.h",
"lutf8lib.c",
"lvm.c",
"lvm.h",
"lzio.c",
"lzio.h",
]
}
Export {
cpp.includePaths: project.ide_source_tree + "/src/libs/3rdparty/lua/src"
}
}

17
src/libs/3rdparty/sol2/sol2.qbs vendored Normal file
View File

@@ -0,0 +1,17 @@
Product {
name: "sol2"
Group {
prefix: "include/"
files: [
"sol/config.hpp",
"sol/forward.hpp",
"sol/sol.hpp",
]
}
Export {
Depends { name: "cpp" }
cpp.includePaths: project.ide_source_tree + "/src/libs/3rdparty/sol2/include"
}
}

View File

@@ -26,7 +26,9 @@ Project {
"utils/utils.qbs",
"3rdparty/libptyqt/ptyqt.qbs",
"3rdparty/libvterm/vterm.qbs",
"3rdparty/lua/lua.qbs",
"3rdparty/qtkeychain/qtkeychain.qbs",
"3rdparty/sol2/sol2.qbs",
"3rdparty/syntax-highlighting/syntax-highlighting.qbs",
"3rdparty/winpty/winpty.qbs",
"3rdparty/yaml-cpp/yaml-cpp.qbs",