28 lines
796 B
CMake
28 lines
796 B
CMake
cmake_minimum_required(VERSION 3.20)
|
|
|
|
# set the project name
|
|
project(container-binary)
|
|
set (CMAKE_CXX_STANDARD 11)
|
|
set (DCMAKE_CXX_FLAGS "-Werror")
|
|
# add_compile_options(-Wstack-usage=1024)
|
|
include(FetchContent)
|
|
|
|
# Build with arduino-audio-tools
|
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../.. ${CMAKE_CURRENT_BINARY_DIR}/arduino-audio-tools )
|
|
endif()
|
|
|
|
|
|
# build sketch as executable
|
|
add_executable (container-binary container-binary.cpp)
|
|
|
|
# set preprocessor defines
|
|
target_compile_definitions(container-binary PUBLIC -DIS_MIN_DESKTOP)
|
|
|
|
# OS/X might need this setting for core audio
|
|
#target_compile_definitions(portaudio PUBLIC -DPA_USE_COREAUDIO=1)
|
|
|
|
# specify libraries
|
|
target_link_libraries(container-binary arduino-audio-tools)
|
|
|