-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
38 lines (26 loc) · 1.09 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 3.12)
# Check for custom cross environment settings
if(EXISTS $ENV{HOME}/cross-env.cmake)
message(STATUS "Custom cross environment detected")
include($ENV{HOME}/cross-env.cmake)
else()
message(STATUS "Custom cross environment is not detected")
endif()
set(PICO_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/pico-sdk)
include(pico_sdk_import.cmake)
project(usb2n64_adapter)
pico_sdk_init()
add_executable(usb2n64_adapter)
pico_generate_pio_header(usb2n64_adapter ${CMAKE_CURRENT_LIST_DIR}/n64send.pio)
target_sources(usb2n64_adapter PUBLIC
${CMAKE_CURRENT_LIST_DIR}/main.c
${CMAKE_CURRENT_LIST_DIR}/hid_app.c
${CMAKE_CURRENT_LIST_DIR}/hid_parser.c
)
# Make sure TinyUSB can find tusb_config.h
target_include_directories(usb2n64_adapter PUBLIC
${CMAKE_CURRENT_LIST_DIR})
target_link_libraries(usb2n64_adapter PUBLIC pico_stdlib pico_multicore hardware_pio hardware_dma hardware_flash tinyusb_host tinyusb_board)
pico_enable_stdio_usb(usb2n64_adapter 0)
pico_enable_stdio_uart(usb2n64_adapter 1)
pico_add_extra_outputs(usb2n64_adapter)