mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 06:13: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:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user