qurt fc_addon fix missing library linking and cleanup

This commit is contained in:
Daniel Agar 2017-11-21 01:57:13 -05:00 committed by ChristophTobler
parent 822fc5725c
commit 698bc7d848
3 changed files with 23 additions and 55 deletions

View File

@ -41,29 +41,19 @@ else()
set(FC_ADDON $ENV{FC_ADDON})
endif()
add_library(libmpu9x50 SHARED IMPORTED GLOBAL)
set_target_properties(libmpu9x50 PROPERTIES IMPORTED_LOCATION ${FC_ADDON}/flight_controller/hexagon/libs/libmpu9x50.so)
include_directories(
${FC_ADDON}/flight_controller/hexagon/inc
)
add_library(mpu9x50 SHARED IMPORTED GLOBAL)
set_target_properties(mpu9x50 PROPERTIES IMPORTED_LOCATION ${FC_ADDON}/flight_controller/hexagon/libs/libmpu9x50.so)
px4_add_module(
MODULE platforms__qurt__fc_addon__mpu_spi
MAIN mpu9x50
STACK_MAIN 1200
COMPILE_FLAGS
INCLUDES
${FC_ADDON}/flight_controller/hexagon/inc
SRCS
mpu9x50_main.cpp
mpu9x50_params.c
DEPENDS
platforms__common
)
set(module_external_libraries
${module_external_libraries}
libmpu9x50
CACHE INTERNAL "module_external_libraries"
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
target_link_libraries(platforms__qurt__fc_addon__mpu_spi PRIVATE mpu9x50)

View File

@ -41,30 +41,19 @@ else()
set(FC_ADDON $ENV{FC_ADDON})
endif()
include_directories(
${FC_ADDON}/flight_controller/hexagon/inc
)
add_library(librc_receiver SHARED IMPORTED GLOBAL)
set_target_properties(librc_receiver PROPERTIES IMPORTED_LOCATION ${FC_ADDON}/flight_controller/hexagon/libs/librc_receiver.so)
add_library(rc_receiver SHARED IMPORTED GLOBAL)
set_target_properties(rc_receiver PROPERTIES IMPORTED_LOCATION ${FC_ADDON}/flight_controller/hexagon/libs/librc_receiver.so)
px4_add_module(
MODULE platforms__qurt__fc_addon__rc_receiver
MAIN rc_receiver
MODULE platforms__qurt__fc_addon__rc_receiver
MAIN rc_receiver
STACK_MAIN 1200
COMPILE_FLAGS
INCLUDES
${FC_ADDON}/flight_controller/hexagon/inc
SRCS
rc_receiver_main.cpp
rc_receiver_params.c
DEPENDS
platforms__common
)
set(module_external_libraries
${module_external_libraries}
librc_receiver
CACHE INTERNAL "module_external_libraries"
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
target_link_libraries(platforms__qurt__fc_addon__rc_receiver PRIVATE rc_receiver)

View File

@ -41,30 +41,19 @@ else()
set(FC_ADDON $ENV{FC_ADDON})
endif()
include_directories(
${FC_ADDON}/flight_controller/hexagon/inc
)
add_library(libuart_esc SHARED IMPORTED GLOBAL)
set_target_properties(libuart_esc PROPERTIES IMPORTED_LOCATION ${FC_ADDON}/flight_controller/hexagon/libs/libuart_esc.so)
add_library(uart_esc SHARED IMPORTED GLOBAL)
set_target_properties(uart_esc PROPERTIES IMPORTED_LOCATION ${FC_ADDON}/flight_controller/hexagon/libs/libuart_esc.so)
px4_add_module(
MODULE platforms__qurt__fc_addon__uart_esc
MAIN uart_esc
MODULE platforms__qurt__fc_addon__uart_esc
MAIN uart_esc
STACK_MAIN 1200
COMPILE_FLAGS
SRCS
uart_esc_main.cpp
INCLUDES
${FC_ADDON}/flight_controller/hexagon/inc
SRCS
uart_esc_main.cpp
uart_esc_params.c
DEPENDS
platforms__common
)
set(module_external_libraries
${module_external_libraries}
libuart_esc
CACHE INTERNAL "module_external_libraries"
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
target_link_libraries(platforms__qurt__fc_addon__uart_esc PRIVATE uart_esc)