cmake remove circular linking and reorganize

- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
This commit is contained in:
Daniel Agar
2018-04-29 21:48:54 -04:00
parent a8bc3d187f
commit ea3acb7121
576 changed files with 1406 additions and 2014 deletions
+13 -14
View File
@@ -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"
+1 -1
View File
@@ -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"