mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 13:18:29 +00:00
1.6 KiB
1.6 KiB
dcr.toml
dcr.toml describes your project, build options, and dependencies.
Example
[package]
name = "neoarc-frontent"
version = "0.1.0"
[build]
language = "c"
standard = "c11"
compiler = "gcc"
# Output directory for binary (optional)
target = "./dist"
# Custom compile/link flags (optional)
cflags = ["-D_POSIX_C_SOURCE=200809L", "-Wall", "-Wextra", "-O2", "-Ilib/frecli"]
ldflags = ["-Llib/frecli", "-lfrecli", "-lm"]
[dependencies]
frecli = { path = "./lib/frecli", include = ["."], lib = ["."], libs = ["frecli"] }
Sections
[package]
name(string, required)version(string, required)
[build]
language(string, required):c,c++,cpp, orcxxstandard(string, required): e.g.c99,c11,c++17compiler(string, required):gcc,clang,cl(msvc), orclang-cltarget(string, optional): output directory for the binary (profile-independent)cflags(string[], optional): additional compile flagsldflags(string[], optional): additional link flags
[dependencies]
Only path dependencies are supported right now.
[dependencies]
fmt = { path = "./lib/fmt", include = ["include"], lib = ["lib"], libs = ["fmt"] }
Rules:
pathcan be absolute or relative to the project root.- If
include/libare missing, DCR looks forinclude,lib, orlib64under the dependency path. - If not found, build fails with a message suggesting to add
include/lib. libsdefaults to the dependency name.
Source Discovery
DCR compiles all .c/.cpp files under src/ recursively. The file containing main() can be located anywhere in that tree.