94 lines
2.2 KiB
Plaintext
94 lines
2.2 KiB
Plaintext
grbc_want_version("1.0")
|
|
grbc_load_platform("platform.hcfg")
|
|
|
|
local grbc_pkg_config_ext = grbc_library(LibraryConfig.new({
|
|
name = "libgrbc_pkg_config",
|
|
language_type = LanguageType.Cpp,
|
|
files = {
|
|
grbc_file("src/ext_pkg_config.cc")
|
|
},
|
|
lib_type = LibraryType.Shared,
|
|
|
|
requirements = {},
|
|
compile_flags = {},
|
|
linker_flags = {},
|
|
|
|
include_dirs = {
|
|
"include",
|
|
"vendor/sol2/include"
|
|
},
|
|
|
|
package_config = PackageConfig.new({
|
|
name = "libgrbc_pkg_config",
|
|
libraries = {},
|
|
include_dirs = {
|
|
grbc_file("include"),
|
|
grbc_file("vendor/sol2/include")
|
|
},
|
|
compile_flags = {},
|
|
linker_flags = {},
|
|
})
|
|
}))
|
|
|
|
local grbc_lib = grbc_library(LibraryConfig.new({
|
|
name = "libgrbc",
|
|
language_type = LanguageType.Cpp,
|
|
files = {
|
|
grbc_file("src/file.cc"),
|
|
grbc_file("src/ninja.cc"),
|
|
grbc_file("src/platform.cc"),
|
|
grbc_file("src/target_exe.cc"),
|
|
grbc_file("src/utils.cc"),
|
|
grbc_file("src/generator.cc"),
|
|
grbc_file("src/target_lib.cc"),
|
|
grbc_file("src/package.cc"),
|
|
grbc_file("src/ext.cc")
|
|
},
|
|
lib_type = LibraryType.Static,
|
|
|
|
requirements = {},
|
|
compile_flags = {},
|
|
linker_flags = {},
|
|
include_dirs = {
|
|
grbc_file("include"),
|
|
grbc_file("vendor/sol2/include")
|
|
},
|
|
|
|
package_config = PackageConfig.new({
|
|
name = "libgrbc",
|
|
libraries = {},
|
|
include_dirs = {
|
|
grbc_file("include"),
|
|
grbc_file("vendor/sol2/include")
|
|
},
|
|
compile_flags = {},
|
|
linker_flags = {},
|
|
})
|
|
}))
|
|
|
|
local grbc_exe = grbc_executable(ExecutableConfig.new({
|
|
name = "grbc",
|
|
language_type = LanguageType.Cpp,
|
|
files = {
|
|
grbc_file("src/main.cc"),
|
|
},
|
|
|
|
requirements = {
|
|
Package.new({
|
|
name = "lua",
|
|
compiler_flags = "",
|
|
linker_flags = "-llua -lm -ldl"
|
|
}),
|
|
|
|
grbc_pkg("libgrbc"),
|
|
grbc_pkg("libgrbc_pkg_config")
|
|
},
|
|
compile_flags = {
|
|
},
|
|
linker_flags = {},
|
|
include_dirs = {}
|
|
}))
|
|
|
|
-- Output the final build script
|
|
grbc_build("ninja")
|