-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
33 lines (30 loc) · 1.78 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
cmake_minimum_required(VERSION 3.15)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/hid)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/cdc)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/msc)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/dfu)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/hub)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/video)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/common)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/demo)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/core)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/port/${USBIP})
# USB source
if(${DEMO_TYPE} STREQUAL "device")
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/core/usbd_core.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/port/${USBIP}/${USB_DRV})
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/cdc/usbd_cdc.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/hid/usbd_hid.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/dfu/usbd_dfu.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/video/usbd_video.c)
elseif(${DEMO_TYPE} STREQUAL "host")
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/core/usbh_core.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/port/${USBIP}/${USB_DRV})
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/hub/usbh_hub.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/msc/usbh_msc.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/cdc/usbh_cdc.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/class/hid/usbh_hid.c)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/osal)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/CherryUSB/osal/usb_osal_rtthread.c)
endif()
add_subdirectory(drv)