1# 2# Copyright 2017, Data61 3# Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4# ABN 41 687 119 230. 5# 6# This software may be distributed and modified according to the terms of 7# the BSD 2-Clause license. Note that NO WARRANTY is provided. 8# See "LICENSE_BSD2.txt" for details. 9# 10# @TAG(DATA61_BSD) 11# 12 13cmake_minimum_required(VERSION 3.7.2) 14 15project(libusbdrivers C) 16 17config_option(LibUSB LIB_USB "Build USB interface library" DEFAULT ON) 18 19add_config_library(usbdrivers "${configure_string}") 20if(LibUSB) 21 22 file( 23 GLOB 24 deps 25 src/*.c 26 src/drivers/*.c 27 src/drivers/arch/${KernelArch}/*.c 28 src/ehci/*.c 29 src/plat/${KernelPlatform}/*.c 30 ) 31 32 list(SORT deps) 33 34 add_library(usbdrivers STATIC EXCLUDE_FROM_ALL ${deps}) 35 target_include_directories(usbdrivers PUBLIC include plat_include/${KernelPlatform}) 36 target_link_libraries(usbdrivers sel4 muslc platsupport usbdrivers_Config lwip_Config) 37endif() 38