mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 22:43: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:
@@ -45,17 +45,16 @@ if("${CONFIG_SHMEM}" STREQUAL "1")
|
||||
set(EXTRA_DEPENDS generate_px4muorb_stubs)
|
||||
endif()
|
||||
|
||||
px4_add_module(
|
||||
MODULE platforms__posix__px4_layer
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
px4_posix_impl.cpp
|
||||
px4_posix_tasks.cpp
|
||||
px4_sem.cpp
|
||||
lib_crc32.c
|
||||
drv_hrt.c
|
||||
${SHMEM_SRCS}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
${EXTRA_DEPENDS}
|
||||
)
|
||||
add_library(px4_layer
|
||||
px4_posix_impl.cpp
|
||||
px4_posix_tasks.cpp
|
||||
px4_sem.cpp
|
||||
lib_crc32.c
|
||||
drv_hrt.c
|
||||
${SHMEM_SRCS}
|
||||
)
|
||||
target_link_libraries(px4_layer PRIVATE work_queue)
|
||||
|
||||
if (EXTRA_DEPENDS)
|
||||
add_dependencies(px4_layer ${EXTRA_DEPENDS})
|
||||
endif()
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
#include "hrt_work.h"
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include "px4_time.h"
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "systemlib/param/param.h"
|
||||
#include <parameters/param.h>
|
||||
|
||||
#include <shmem.h>
|
||||
#include "px4muorb.h"
|
||||
|
||||
Reference in New Issue
Block a user