Skip to content

Commit

Permalink
make cavacore an actual library with cmake #487
Browse files Browse the repository at this point in the history
  • Loading branch information
karlstav committed Dec 20, 2023
1 parent 615d678 commit 2498a5c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
13 changes: 12 additions & 1 deletion CAVACORE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ This feature can be adjusted.
The range of an input signal can vary a lot. cavacore can keep the output signal within range in real-time. This feature can be disabled.


# Building

use the root CMakeLists.txt to build it:

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

# Usage

See cavacore.h for documentation and the cavacore_test.c application for how to use.
See cavacore.h for documentation and the cavacore_test.c application for how to use.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is only for the cavacore lib, see CAVACORE.md for details
# to build cava don't use this, use the automake stuff

cmake_minimum_required(VERSION 3.13.0)
project(cavacore)
add_library(cavacore STATIC cavacore.c)
4 changes: 2 additions & 2 deletions cavacore_test.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// cavacore standalone test app, build cava first and compile with:
// cavacore standalone test app, build cavacore lib first and compile with:
// gcc -c -g cavacore_test.c
// gcc -o cavacore_test cavacore_test.o cava-cavacore.o -lm -lfftw3
// gcc -o cavacore_test cavacore_test.o build/libcavacore.a -lm -lfftw3

#include "cavacore.h"
#include <math.h>
Expand Down

0 comments on commit 2498a5c

Please sign in to comment.