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
+9 -9
View File
@@ -64,13 +64,13 @@ add_custom_command(OUTPUT ${px4_git_ver_header}
set_source_files_properties(${px4_git_ver_header} PROPERTIES GENERATED TRUE)
add_custom_target(ver_gen ALL DEPENDS ${px4_git_ver_header})
px4_add_module(
MODULE lib__version
COMPILE_FLAGS
SRCS
version.c
DEPENDS
ver_gen
platforms__common
)
# The URL for the elf file for crash logging
if (DEFINED ENV{BUILD_URI})
set(BUILD_URI $ENV{BUILD_URI})
else()
set(BUILD_URI "localhost")
endif()
add_definitions(-DBUILD_URI=${BUILD_URI})
px4_add_library(version version.c ${px4_git_ver_header})