Skip to content

Commit 2bdfd14

Browse files
tmon-nordichenrikbrixandersen
authored andcommitted
drivers: usb: buf: Do not add empty library
Change CMakeLists.txt to register Zephyr library only if respective source code is compiled. Fixes CMake Warning: No SOURCES given to Zephyr library: drivers__usb__common__buf Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
1 parent f7a9464 commit 2bdfd14

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Copyright Nordic Semiconductor ASA
22
# SPDX-License-Identifier: Apache-2.0
33

4-
zephyr_library()
5-
zephyr_library_sources_ifdef(CONFIG_UDC_DRIVER usb_buf.c)
4+
if(CONFIG_UDC_DRIVER OR CONFIG_UHC_DRIVER)
5+
zephyr_library()
6+
zephyr_library_sources(usb_buf.c)
7+
endif()

0 commit comments

Comments
 (0)