Skip to content
/ bweas Public

cross-platform system build

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYRIGHT
Notifications You must be signed in to change notification settings

svec1/bweas

Repository files navigation

bweas

system build

Documentation of the internal device

Install

git clone https://github.com/svec1/bweas.git

Note

Globally required: CMake

Build on Linux

Before building, you should install the LuaJit and nlohmann-json libraries.

debian based(for example)
sudo apt install luajit nlohmann-json3-dev liblz4-dev

Default build with cmake:

mkdir build
cd build
cmake ..
cmake --build .

Build with clone rep of libraries

You can also clone the LuaJit or nlohmann/json repositories and follow these steps:

Note

For LuaJit: Required: Make

cd external
git clone https://github.com/LuaJIT/LuaJIT
cd LuaJIT
sudo make install

For lz4 and nlohmann-json

cd external
git clone https://github.com/lz4/lz4
git clone https://github.com/nlohmann/json

Important

You don't need to compile it yourself(nlohmann-json and lz4), the cmake call will do it for you next..

Tip

If you did this, then you need to set the appropriate options for cmake when building:

cmake -DUSER_BUILD_LUA=ON -DUSER_BUILD_JSON=ON ..
cmake --build .

Build on Windows

starting from the source folder

Note

Required: CMake, VCPKG

git clone https://github.com/microsoft/vcpkg.git
vcpkg\bootstrap-vcpkg.bat
vcpkg\vcpkg integrate install
mkdir build
cd build
cmake -DBWEAS_BUILD_VCPKG=ON ..
cmake --build .

Tip

To build tests, pass -DBWEAS_TEST=ON as an option to cmake


Static Badge Static Badge

Examples

Simple configurations for assembly will be described here. These examples are for informational purposes only and do not include complex structures and new features.

# For example(how create variable)
set(VAR, 1)

# We create a call component - what will be called
# This also stores the name pattern of files that the current calling component may create.
create_call_component(CC, "clang++", "program.exe")

# Create a command template. You can use the capabilities that the current generator
# provides (in this case, a file will be substituted for FBS_CURRENT_OUTPUT_FILE - because filter 1 was selected)
create_templates(template, "CC(NULL) -> EXECUTABLE: <[T_PROJECT_SRC_FILES]>, <'-o'>, FBS_CURRENT_OUTPUT_FILE:1")

# Creating a project (there can be as many of them as you like)
# The number 1 as the second parameter indicates the programming language number
project(test, 1, "main.cpp")

# We indicate that the project will use template command generation
use_it_template(test, TRUE)
use_templates(test, "template")

# create a target in the form of an executable file (there can be as many of them as you like)
executable(test_program, RELEASE, test)