PavelKovalets / k52

k52 is a set of c++ libraries aimed to facilitate scientific experiments in the fields of signal processing and sound analysis with the strong incline into OOP, flexibility and readability.
MIT License
3 stars 8 forks source link

DOI Build Status Coverity Scan Build Status

Intro

k52 is a set of c++ libraries aimed to facilitate scientific experiments in the fields of signal processing and sound analysis with the strong incline into OOP, flexibility and readability. It also provides the implementation of some optimization, classification and other methods, as well as set of handy tools to support parallel computing. Distributed under the MIT License.

Quick start

Preparation

On both Linux and Windows you should install git and clone k52 repository.

For example you can create folder e:\example\ and run following commands from command prompt:

$ cd "e:\example"
$ git clone git@github.com:PavelKovalets/k52.git

Now you will have e:\example\k52 folder which contains k52 code. We will call it the k52 root folder.

Windows and Visual Studio

Prerequisites:

In this example we will use e:\example as a folder in which we will build k52. You can use any other folder path if you want.

Hint: However you should check that your full path doesn't contain spaces, otherwise some CMake code will fails (e.g. boost required headers will not be found)

Steps:

This is the minimum set of steps to build k52. However some parts of k52 will not be build. To get fully-functional version you need to make some additional steps. After that you should re-run CMake to update the solution.

Linux steps

All you have to do is:

Other approaches to build using CMake

In case of CMake - aware IDE's you just need to open CMake file from k52 root folder and build it.

Else, from k52 root folder execute following commands using cmd:

$ mkdir build
$ cd build
$ cmake ..

This will create project files for your default compiler/IDE in build folder. You should check if there were no errors from ->-> K52 MESSAGE <-<-, if there are - try to fix them.

Now you have all the files that are necessary to build k52 in build folder.

Run tests

Use k52 in other project

k52 provides CMake config-file package during the install process. It can be then used by other CMake project to easily use k52.

To do so first you have to run install $ make install (or build INSTALL project in VS). After that you'll have install folder in k52 root folder, which contains all necessary files - config-file package, libs, headers.

After that you just need to link this config-file package in your project and use find_package(k52 CONFIG). Example CMake project file that uses such config-file package is following:

cmake_minimum_required(VERSION 3.0)
set(PROJECT_NAME "test_project")
project(${PROJECT_NAME})

set(BOOST_ROOT "[your Boost root path here]")
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})

find_package(k52 CONFIG REQUIRED HINTS "[your k52 install path here]")

include_directories(${k52_INCLUDE_DIRS})
link_directories(${k52_LIBRARY_DIRS})

add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} ${k52_LIBRARIES})

Hint You can take a look at the tools/build_k52_run_examples.sh script and try to run its commands one by one to get the complete picture of how to use k52. Or you can check to the examples folder which contains working examples of k52 usage.

Detailed info

Libs description

Gitflow Workflow

k52 uses Gitflow Workflow. We have following dedicated branches:

Repository structure

The k52 root folder has following content:

Folders

Files

Build system

CMake, the cross-platform, open-source build system is used in k52, so you must install it to build k52. While theoretically any platform supported by CMake will be ok, the tested are Windows and Linux. make system is fully supported.

Following IDE might be helpful:

Using Vagrant box

Vagrant is a handy tool that easily provides the environment on which k52 can be build:

Known issues