mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 01:23: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:
+10
-14
@@ -30,17 +30,13 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
px4_add_module(
|
||||
MODULE lib__rc
|
||||
COMPILE_FLAGS
|
||||
-Wno-unused-result
|
||||
SRCS
|
||||
st24.cpp
|
||||
sumd.cpp
|
||||
sbus.cpp
|
||||
dsm.cpp
|
||||
common_rc.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
add_library(rc
|
||||
st24.cpp
|
||||
sumd.cpp
|
||||
sbus.cpp
|
||||
dsm.cpp
|
||||
common_rc.cpp
|
||||
)
|
||||
target_compile_options(rc PRIVATE -Wno-unused-result)
|
||||
target_link_libraries(rc PRIVATE prebuild_targets)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE lib__rc__rc_tests
|
||||
MAIN rc_tests
|
||||
@@ -38,7 +39,5 @@ px4_add_module(
|
||||
SRCS
|
||||
RCTest.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
rc
|
||||
)
|
||||
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
Reference in New Issue
Block a user