CMake: only include UART related files when (at least) one UART driver is enabled
This commit is contained in:
parent
699e9123ea
commit
b6b356b948
2 changed files with 8 additions and 3 deletions
|
|
@ -13,10 +13,13 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/chips)
|
|||
|
||||
# Library's buses
|
||||
IF(LIBUSB_FOUND)
|
||||
SET(BUSES_SOURCES buses/uart buses/usbbus)
|
||||
ELSE(LIBUSB_FOUND)
|
||||
SET(BUSES_SOURCES buses/uart)
|
||||
SET(BUSES_SOURCES buses/usbbus)
|
||||
ENDIF(LIBUSB_FOUND)
|
||||
|
||||
IF(UART_REQUIRED)
|
||||
LIST(APPEND BUSES_SOURCES buses/uart)
|
||||
ENDIF(UART_REQUIRED)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/buses)
|
||||
|
||||
IF(WIN32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue