cmake magic
This commit is contained in:
parent
df85ca4267
commit
6f51f5e962
4 changed files with 20 additions and 10 deletions
|
@ -1,3 +1,16 @@
|
|||
configure_file(config.h.in config.h @ONLY)
|
||||
|
||||
# Make sure TinyUSB can find tusb_config.h
|
||||
target_include_directories(raspi_keyer PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
# Make sure the compiler can find the
|
||||
# generated config.h
|
||||
target_include_directories(raspi_keyer PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
target_sources(raspi_keyer PRIVATE
|
||||
raspi_keyer.cpp
|
||||
settings.cpp
|
||||
|
|
3
src/config.h.in
Normal file
3
src/config.h.in
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#cmakedefine PROJECT_VERSION "@PROJECT_VERSION@"
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "keyer.h"
|
||||
#include "settings.h"
|
||||
#include <config.h>
|
||||
#include "tusb_config.h"
|
||||
|
||||
namespace
|
||||
|
@ -199,7 +200,7 @@ int main()
|
|||
board_init();
|
||||
tud_init(BOARD_TUD_RHPORT);
|
||||
|
||||
printf("Hello from core0!\n");
|
||||
printf("RaspiKeyer Version %s\n", PROJECT_VERSION);
|
||||
|
||||
queue_init(&keyerQueue, sizeof(KeyerQueueData), 2);
|
||||
multicore_reset_core1();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue