mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 07:43:35 +08:00
cmake: fixes for apps.h generation for posix and qurt
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -7,8 +7,8 @@ message(STATUS "module list: ${module_dir_list}")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
add_custom_command(OUTPUT apps.h
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/posix_apps.py > apps.h)
|
||||
#add_custom_command(OUTPUT apps.h
|
||||
# COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/posix_apps.py > apps.h)
|
||||
|
||||
foreach(directory ${module_dir_list})
|
||||
message(STATUS "directory: ${directory}")
|
||||
@@ -17,13 +17,13 @@ foreach(directory ${module_dir_list})
|
||||
${mangled_name})
|
||||
endforeach()
|
||||
px4_posix_generate_builtin_commands(
|
||||
OUT builtin_commands.cpp
|
||||
OUT apps.h
|
||||
MODULE_LIST ${module_list})
|
||||
|
||||
add_executable(mainapp
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
||||
apps.h
|
||||
builtin_commands.cpp)
|
||||
)
|
||||
|
||||
set(main_link_flags
|
||||
"-T${CMAKE_SOURCE_DIR}/cmake/posix/ld.script"
|
||||
|
||||
@@ -16,7 +16,7 @@ foreach(directory ${module_dir_list})
|
||||
${mangled_name})
|
||||
endforeach()
|
||||
px4_qurt_generate_builtin_commands(
|
||||
OUT builtin_commands.cpp
|
||||
OUT apps.h
|
||||
MODULE_LIST ${module_list})
|
||||
|
||||
# FIXME @jgoppert - how to work around issues like this?
|
||||
@@ -25,7 +25,10 @@ px4_qurt_generate_builtin_commands(
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
|
||||
add_library(mainapp builtin_commands.cpp)
|
||||
add_library(mainapp
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/qurt/px4_layer/main.cpp
|
||||
apps.h)
|
||||
|
||||
target_link_libraries(mainapp
|
||||
-Wl,--whole-archive
|
||||
${module_list}
|
||||
|
||||
Reference in New Issue
Block a user