fix: 优化了CMakeLists.txt文件的顺序,可读性更好
This commit is contained in:
@@ -45,7 +45,6 @@ target_link_directories(${CMAKE_PROJECT_NAME} PRIVATE
|
||||
# Add sources to executable
|
||||
target_sources(${CMAKE_PROJECT_NAME} PRIVATE
|
||||
# Add user sources here
|
||||
|
||||
)
|
||||
|
||||
# Add include paths
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
add_subdirectory(led)
|
||||
|
||||
add_library(driver INTERFACE)
|
||||
target_link_libraries(driver INTERFACE led_lib)
|
||||
target_sources(driver INTERFACE ./base/interface.cpp)
|
||||
target_include_directories(driver INTERFACE ./base)
|
||||
|
||||
add_subdirectory(led)
|
||||
if (DRIVER_CPP)
|
||||
add_subdirectory(base/gpio)
|
||||
target_compile_definitions(driver INTERFACE DRIVER_CPP)
|
||||
endif ()
|
||||
target_link_libraries(driver INTERFACE led_lib)
|
||||
target_sources(driver INTERFACE ./base/interface.cpp)
|
||||
target_include_directories(driver INTERFACE ./base)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
#include "main.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
typedef struct {
|
||||
GPIO_TypeDef *port;
|
||||
|
||||
Reference in New Issue
Block a user