You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
747 B
30 lines
747 B
cmake_minimum_required(VERSION 3.20)
|
|
project(synth)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
if(MSVC)
|
|
set(CMAKE_CXX_FLAGS "/W4")
|
|
set(CMAKE_CXX_FLAGS_DEBUG "/DEBUG:FASTLINK /fp:fast")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /fp:fast /DNDEBUG")
|
|
else()
|
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wdouble-promotion")
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -ffast-math")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -DNDEBUG")
|
|
endif()
|
|
|
|
if(MSVC)
|
|
add_compile_definitions(_USE_MATH_DEFINES)
|
|
endif()
|
|
|
|
add_library(synth
|
|
src/luts.cpp
|
|
src/synth.cpp
|
|
src/voicemanager.cpp
|
|
src/channel.cpp
|
|
src/preset.cpp
|
|
src/voice.cpp
|
|
src/dsp/oscillator.cpp
|
|
src/dsp/filter.cpp
|
|
src/dsp/adsr.cpp
|
|
src/perf.cpp)
|
|
target_include_directories(synth PUBLIC include) |