|
| 1 | +cmake_minimum_required(VERSION 3.20) |
| 2 | + |
| 3 | +# set the project name |
| 4 | +project(tests-codec) |
| 5 | +set (CMAKE_CXX_STANDARD 11) |
| 6 | +set (DCMAKE_CXX_FLAGS "-Werror" ) |
| 7 | +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") |
| 8 | + set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
| 9 | + set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
| 10 | +endif() |
| 11 | + |
| 12 | + |
| 13 | +include(FetchContent) |
| 14 | + |
| 15 | +# Build with Portaudio |
| 16 | +FetchContent_Declare(portaudio GIT_REPOSITORY "https://github.com/PortAudio/portaudio.git" GIT_TAG v19.7.0 ) |
| 17 | +FetchContent_GetProperties(portaudio) |
| 18 | +if(NOT portaudio_POPULATED) |
| 19 | + FetchContent_Populate(portaudio) |
| 20 | + add_subdirectory(${portaudio_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/portaudio) |
| 21 | +endif() |
| 22 | + |
| 23 | +# Build with Linux Arduino Emulator |
| 24 | +FetchContent_Declare(arduino_emulator GIT_REPOSITORY "https://github.com/pschatzmann/Arduino-Emulator.git" GIT_TAG main ) |
| 25 | +FetchContent_GetProperties(arduino_emulator) |
| 26 | +if(NOT arduino_emulator_POPULATED) |
| 27 | + FetchContent_Populate(arduino_emulator) |
| 28 | + add_subdirectory(${arduino_emulator_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/emulator) |
| 29 | +endif() |
| 30 | + |
| 31 | +#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/mp3-helix ${CMAKE_CURRENT_BINARY_DIR}/mp3-helix) |
| 32 | +#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/aac-helix ${CMAKE_CURRENT_BINARY_DIR}/aac-helix) |
| 33 | +#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/aac-fdk ${CMAKE_CURRENT_BINARY_DIR}/aac-fdk) |
| 34 | +#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/aac-fdk-encode ${CMAKE_CURRENT_BINARY_DIR}/aac-fdk-encode) |
| 35 | +#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/mp3-lame ${CMAKE_CURRENT_BINARY_DIR}/mp3-lame) |
| 36 | +#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/mp3-mad ${CMAKE_CURRENT_BINARY_DIR}/mp3-mad) |
| 37 | +#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/mp3-metadata ${CMAKE_CURRENT_BINARY_DIR}/mp3-metadata) |
| 38 | + |
0 commit comments