Add CMake for command-line example
This commit is contained in:
parent
d34b33da28
commit
370c69a298
13
cmd/CMakeLists.txt
Normal file
13
cmd/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
project(example-cmd VERSION 1.0.0)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
add_executable(stretch ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
|
||||
|
||||
include(FetchContent)
|
||||
set(FETCHCONTENT_QUIET False)
|
||||
FetchContent_Declare(
|
||||
inputs
|
||||
URL https://signalsmith-audio.co.uk/code/stretch/inputs.zip
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/inputs"
|
||||
)
|
||||
FetchContent_MakeAvailable(inputs)
|
||||
@ -1,9 +1,15 @@
|
||||
all: out/stretch
|
||||
|
||||
dev: clean out/stretch
|
||||
mkdir -p out/examples
|
||||
inputs/run-all.sh out/examples/u2- out/stretch --semitones=2
|
||||
cd ../linear/tests; make
|
||||
|
||||
out/stretch: ../signalsmith-stretch.h main.cpp util/*.h util/*.hxx ../dsp/*.h
|
||||
mkdir -p out
|
||||
g++ -std=c++11 -O3 -g \
|
||||
-Wall -Wextra -Wfatal-errors -Wpedantic -pedantic-errors \
|
||||
-framework Accelerate -DSIGNALSMITH_USE_ACCELERATE \
|
||||
main.cpp -o out/stretch
|
||||
|
||||
# Uses input files from: https://signalsmith-audio.co.uk/code/stretch/inputs.zip
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user