# 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" [lang.c] version = "c11" [lang.cpp] version = "c++14" [define] BOOST_ASIO_SEPERATE_COMPILATION = "1" [define.static] BOOST_COMPILE_STATIC = "1" [define.dynamic] BOOST_COMPILE_DYNAMIC = "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 ## lang.* Optional. Allows you to change language specific configuration. \[lang.c] is for C and \[lang.cpp] is for C++. Version specifies the language version, for \[lang.c] the version can be ansi, c89, c99 or c11 - if not set, c11 will be used. For \[lang.cpp] the version can be c++11, c++14 or c++17 - if not set, c++14 will be used ## 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) ## define.static Works like \[define], but these definitions are only used when building static project. If a definition with the same exists in \[define], then it's overwritten ## define.dynamic Works like \[define], but these definitions are only used when building dynamic project. If a definition with the same exists in \[define], then it's overwritten ## 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]