aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: cd06dc630d2ce3660c74b4852c9f2cddef5aca5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Simple Build System for Native Languages
Sibs is still in very early testing phase, should only be used if you want to toy around with it. Every new release currently has changes that break backwards compatibility since the design has not been decided yet.

Sibs is inspired by [Cargo](https://github.com/rust-lang/cargo/), you can think of it like a C/C++ version of Cargo.

The CMakeLists.txt is only for development purpose and only compiles on linux.
# Installation
Newest version of sibs builds itself. If you don't already have sibs installed, you need to download latest release first: https://github.com/DEC05EBA/sibs/releases
After you've download the latest release, you can install it by running install.sh (or use sibs.exe if you are on windows).
When you have sibs installed, you can install latest version of sibs by running install.sh if you are on Linux. New install script uses sibs.

Installing latest version currently doesn't work on Windows.
# Project configuration template
```
[package]
name = "packageName"
type = "library"
version = "0.1.0"
platforms = ["linux32", "linux64", "win32", "win64"]
authors = ["DEC05EBA <0xdec05eba@gmail.com>"]
tests = "tests"
include_dirs = ["include"]
ignore_dirs = ["examples"]

[dependencies]
catch2 = "0.1.0"
xxhash = "0.1.0"

[define]
BOOST_ASIO_SEPERATE_COMPILATION = "1"

[config]
expose_include_dirs = ["include"]

[config.win32.static.debug]
lib = "windows/x86/static/debug"

[config.win32.static.release]
lib = "windows/x86/static/release"

[config.win64.static.debug]
lib = "windows/x64/static/debug"

[cmake]
dir = "."
args = ["ENTITYX_RUN_BENCHMARKS=0"]

[cmake.static]
args = ["ENTITYX_BUILD_SHARED=0"]

[cmake.dynamic]
args = ["ENTITYX_BUILD_SHARED=1"]
```
## package
### name
Required

### type
Required. Should be one of: "executable", "static", "dynamic", "library"

### version
Required. Version string has to be in the format of "xxx.yyy.zzz" where xxx is major, yyy is minor and zzz is patch

### platforms
Required. A list of platforms the package supports. Can contain the following values: "any", "linux32", "linux64", "win32", "win64".
If platforms contains "any", then other there is no need to specify other platforms

### authors
Optional. A list of authors

### tests
Optional. Path which contains tests. The test directory may contain a project.conf file which can contain \[dependencies] block for specifying test only dependencies. The test automatically includes the parent project as a dependency.

### include_dirs
Optional. A list of directories which should be specified as global include directories when compiling. This means that instead of using relative paths to header files, you can include the directory with headers and then you only have to specify the header name when using #include

### ignore_dirs
Optional. A list of directories to ignore. This means that if the ignored directory contains source files, then they wont be included in the build
## dependencies
Optional. A list of dependencies which are specified in name-value pairs where the name is the name of the dependency, which should match the dependency name under the packages name specified in its project.conf file.
Currently, the value is the version and has to be an exact match for the package version, which is specified in the dependencies project.conf file.
This will later change and you should be able to choose minimum version and range of versions.

Dependencies are automatically choosen from system (linux, mac) or if no package manager exists, then it's download from github
## define
Optional. A list of definitions which are specified in name-value pairs where the name is the preprocessor to define (in c: #define name value)
## config
### expose_include_dirs
Optional. A list of directories which contains (header) files which should be exposed to dependencies as directories to include globally. This means that dependencies can include (header) files from the dependency without specifying path to the dependency
## config.*
Optional. The name is structured in the following way: config.platform.libraryType.optimizationLevel
where platform is any of the platforms specified under \[package] (or if package contains "any", then it can be any other platform). LibraryType is either "static" or "dynamic" - different configurations depending on if the package is included as a static or dynamic library by a dependant package. OptimizationLevel is either "debug" or "release", depending on which optimization level the "root" package was built with ("root" package is usually the project which is an executable)
### lib
Optional. A directory which contains .lib or .dll files which should be included in dependant projects that uses this project
## cmake
Optional. Using this allows you to build cmake projects. If a project contains cmake in the project.conf file, then sibs wont build the project itself
and will use cmake instead. Sibs will put the built executable and library files into the same location they would be if sibs build them,
meaning you can have dependency to a cmake project from a sibs project and it will automatically use the dependency library files
### dir
Optional. Directory that contains CMakeLists.txt. If this is not specified, the project root will be used (same location where project.conf is located)
### args
Optional. List of arguments to cmake. The arguments should be in the same format as "-D" arguments (options) in cmake, except they should exclude "-D".
Do not use CMAKE_BUILD_TYPE as sibs will automatically use it depending on the optimization level the user specifies when building project.
## cmake.*
Optional. The name is structured in the following way: config.libraryType 
where libraryType is either "static" or "dynamic" - different configurations depending on if the package is included as a static or dynamic library by a dependant package.
Args specified under \[cmake.static] or \[cmake.dynamic] are appended to the args specified under \[cmake]