mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 20:53:35 +08:00
The link needed --start-group and --end-group for clang on Linux for posix builds. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
28 lines
476 B
CMake
28 lines
476 B
CMake
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
px4_posix_generate_builtin_commands(
|
|
OUT apps.h
|
|
MODULE_LIST ${module_libraries})
|
|
|
|
add_executable(mainapp
|
|
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
|
apps.h
|
|
)
|
|
|
|
if (NOT APPLE)
|
|
target_link_libraries(mainapp
|
|
-Wl,--start-group
|
|
${module_libraries}
|
|
pthread m rt
|
|
-Wl,--end-group
|
|
)
|
|
else()
|
|
target_link_libraries(mainapp
|
|
${module_libraries}
|
|
pthread m
|
|
)
|
|
endif()
|
|
|
|
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|