代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.0)
# set the project name
project(arduino-audio-tools)
include(FetchContent)
add_library(arduino-audio-tools INTERFACE)
#option(BUILD_TESTS "Build all tests automatically" OFF)
option(ADD_STD_LIB "Add Standard Desktop Libraries" ON)
# make include directory available to calling projects
target_include_directories (arduino-audio-tools INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/src)
# installation of all header files
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/" # source directory
DESTINATION "include/arduino-audio-tools" # target directory
FILES_MATCHING # install only matched files
PATTERN "*.h" # select header files
)
# Add basic libraries necessary for desktop build
if (ADD_STD_LIB)
FetchContent_Declare(portaudio GIT_REPOSITORY "https://github.com/PortAudio/portaudio.git" GIT_TAG v19.7.0 )
FetchContent_GetProperties(portaudio)
if(NOT portaudio_POPULATED)
FetchContent_Populate(portaudio)
add_subdirectory(${portaudio_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/portaudio)
endif()
target_compile_options(portaudio PUBLIC -Wno-deprecated-declarations)
# Build with Linux Arduino Emulator
FetchContent_Declare(arduino_emulator GIT_REPOSITORY "https://github.com/pschatzmann/Arduino-Emulator.git" GIT_TAG main )
FetchContent_GetProperties(arduino_emulator)
if(NOT arduino_emulator_POPULATED)
FetchContent_Populate(arduino_emulator)
add_subdirectory(${arduino_emulator_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/emulator)
endif()
endif()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。