cmake: fix CMake build break

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-07-13 16:31:02 +08:00
committed by Xiang Xiao
parent f49ee08ab4
commit f10b54a081
21 changed files with 527 additions and 212 deletions
+8 -1
View File
@@ -17,6 +17,13 @@
# the License.
#
# ##############################################################################
if(CONFIG_MOTOR_FOC)
target_sources(drivers PRIVATE foc_dev.c)
set(SRCS foc_dev.c)
if(CONFIG_MOTOR_FOC_DUMMY)
list(APPEND SRCS foc_dummy.c)
endif()
target_include_directories(drivers PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(drivers PRIVATE ${SRCS})
endif()