File tree Expand file tree Collapse file tree 3 files changed +23
-15
lines changed Expand file tree Collapse file tree 3 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -2,21 +2,11 @@ cmake_minimum_required(VERSION 3.16)
2
2
3
3
# set the project name
4
4
project (arduino_helix)
5
- include (FetchContent)
6
5
7
6
# lots of warnings and all warnings as errors
8
7
## add_compile_options(-Wall -Wextra )
9
8
set (CMAKE_CXX_STANDARD 17)
10
9
11
- # Build with Linux Arduino Emulator
12
- FetchContent_Declare(arduino_emulator GIT_REPOSITORY "https://github.com/pschatzmann/Arduino-Emulator.git" GIT_TAG main )
13
- FetchContent_GetProperties(arduino_emulator)
14
- if (NOT arduino_emulator_POPULATED)
15
- FetchContent_Populate(arduino_emulator)
16
- add_subdirectory (${arduino_emulator_SOURCE_DIR} )
17
- endif ()
18
-
19
-
20
10
file (GLOB_RECURSE SRC_LIST_C CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR} /src/*.c" )
21
11
22
12
# define libraries
@@ -28,9 +18,6 @@ target_compile_options(arduino_helix PRIVATE -DUSE_DEFAULT_STDLIB)
28
18
# define location for header files
29
19
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 )
30
20
31
- # specify libraries
32
- target_link_libraries (arduino_helix arduino_emulator)
33
-
34
21
# build examples
35
22
add_subdirectory ( "${CMAKE_CURRENT_SOURCE_DIR} /examples/output_mp3" )
36
23
add_subdirectory ( "${CMAKE_CURRENT_SOURCE_DIR} /examples/output_aac" )
Original file line number Diff line number Diff line change @@ -2,13 +2,24 @@ cmake_minimum_required(VERSION 3.16)
2
2
3
3
# set the project name
4
4
project (aac)
5
+ include (FetchContent)
6
+
5
7
set (DCMAKE_CXX_FLAGS -Werror -Wall -Wextra)
6
8
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address" )
7
9
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address" )
8
10
11
+ # Build with Linux Arduino Emulator
12
+ FetchContent_Declare(arduino_emulator GIT_REPOSITORY "https://github.com/pschatzmann/Arduino-Emulator.git" GIT_TAG main )
13
+ FetchContent_GetProperties(arduino_emulator)
14
+ if (NOT arduino_emulator_POPULATED)
15
+ FetchContent_Populate(arduino_emulator)
16
+ add_subdirectory (${arduino_emulator_SOURCE_DIR} arduino-emulator)
17
+ endif ()
18
+
19
+
9
20
# build sketch as executable
10
21
add_executable (aac desktop_aac.cpp )
11
22
target_compile_options (aac PRIVATE -DEMULATOR)
12
23
13
24
# specify libraries
14
- target_link_libraries (aac arduino_helix)
25
+ target_link_libraries (aac arduino_helix arduino_emulator )
Original file line number Diff line number Diff line change @@ -2,14 +2,24 @@ cmake_minimum_required(VERSION 3.16)
2
2
3
3
# set the project name
4
4
project (mp3)
5
+ include (FetchContent)
6
+
5
7
set (DCMAKE_CXX_FLAGS -Werror -Wall -Wextra)
6
8
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address" )
7
9
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address" )
8
10
11
+ # Build with Linux Arduino Emulator
12
+ FetchContent_Declare(arduino_emulator GIT_REPOSITORY "https://github.com/pschatzmann/Arduino-Emulator.git" GIT_TAG main )
13
+ FetchContent_GetProperties(arduino_emulator)
14
+ if (NOT arduino_emulator_POPULATED)
15
+ FetchContent_Populate(arduino_emulator)
16
+ add_subdirectory (${arduino_emulator_SOURCE_DIR} arduino-emulator)
17
+ endif ()
18
+
9
19
# build sketch as executable
10
20
add_executable (mp3 desktop_mp3.cpp )
11
21
target_compile_options (mp3 PRIVATE -DEMULATOR)
12
22
13
23
# specify libraries
14
- target_link_libraries (mp3 arduino_helix)
24
+ target_link_libraries (mp3 arduino_helix arduino_emulator )
15
25
You can’t perform that action at this time.
0 commit comments