mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 11:53:34 +08:00
cmake remove circular linking and reorganize
- px4_add_module now requires MAIN - px4_add_library doesn't automatically link
This commit is contained in:
@@ -30,17 +30,14 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
px4_add_module(
|
||||
MODULE drivers__stm32
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
drv_hrt.c
|
||||
drv_io_timer.c
|
||||
drv_pwm_servo.c
|
||||
drv_pwm_trigger.c
|
||||
drv_input_capture.c
|
||||
drv_led_pwm.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
add_library(drivers_arch
|
||||
drv_hrt.c
|
||||
drv_io_timer.c
|
||||
drv_pwm_servo.c
|
||||
drv_pwm_trigger.c
|
||||
drv_input_capture.c
|
||||
drv_led_pwm.cpp
|
||||
)
|
||||
add_dependencies(drivers_arch prebuild_targets)
|
||||
target_link_libraries(drivers_arch PRIVATE drivers_board)
|
||||
|
||||
@@ -30,13 +30,10 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE drivers__stm32__adc
|
||||
MODULE drivers__adc
|
||||
MAIN adc
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
adc.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include <stm32_gpio.h>
|
||||
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include <uORB/topics/system_power.h>
|
||||
#include <uORB/topics/adc_report.h>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/px4_macros.h>
|
||||
|
||||
@@ -30,13 +30,12 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE drivers__stm32__tone_alarm
|
||||
MODULE drivers__tone_alarm
|
||||
MAIN tone_alarm
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
tone_alarm.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
tunes
|
||||
)
|
||||
Reference in New Issue
Block a user