Skip to content

Commit

Permalink
Option for building examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Jun 23, 2024
1 parent d326856 commit efcf0b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ project(arduino_helix)
## add_compile_options(-Wall -Wextra )
set(CMAKE_CXX_STANDARD 17)

option(MP3_EXAMPLES "build examples" OFF)

file(GLOB_RECURSE SRC_LIST_C CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.c" )
file(GLOB_RECURSE SRC_LIST_CPP CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.cpp" )

Expand All @@ -20,5 +22,7 @@ target_compile_options(arduino_helix PRIVATE -DUSE_DEFAULT_STDLIB)
target_include_directories(arduino_helix PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/libhelix-mp3 ${CMAKE_CURRENT_SOURCE_DIR}/src/libhelix-aac )

# build examples
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/examples/output_mp3")
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/examples/output_aac")
if(MP3_EXAMPLES)
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/examples/output_mp3")
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/examples/output_aac")
endif()

0 comments on commit efcf0b6

Please sign in to comment.