forked from Archive/PX4-Autopilot
cmake: fixes for qurt build after refactoring
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
parent
cadc7280b7
commit
08dc74afac
|
@ -1,4 +1,7 @@
|
|||
include(qurt/px4_impl_qurt)
|
||||
|
||||
function(px4_set_config_modules out_module_list)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
drivers/boards/sitl
|
||||
|
@ -81,5 +84,6 @@ function(px4_set_config_modules out_module_list)
|
|||
modules/muorb/adsp
|
||||
)
|
||||
set(${out_module_list} ${config_module_list} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
|
||||
include(common/px4_base)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/posix)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/posix/configs)
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
|
|
|
@ -51,8 +51,9 @@
|
|||
|
||||
include(common/px4_base)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/qurt)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/qurt/configs)
|
||||
include(qurt_funcs)
|
||||
|
||||
px4_add_git_submodule(TARGET git_dspal PATH "src/lib/dspal")
|
||||
px4_add_git_submodule(TARGET git_eigen32 PATH "src/lib/eigen-3.2")
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
|
@ -225,7 +226,8 @@ function(px4_os_prebuild_targets)
|
|||
ONE_VALUE OUT BOARD THREADS
|
||||
REQUIRED OUT BOARD
|
||||
ARGN ${ARGN})
|
||||
add_custom_target(${OUT})
|
||||
add_custom_target(${OUT} DEPENDS git_dspal git_eigen32)
|
||||
add_custom_target(ALL DEPENDS git_eigen32)
|
||||
execute_process(
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/lib/eigen-3.2
|
||||
COMMAND patch -p1 -i ../../../cmake/qurt/qurt_eigen.patch)
|
||||
|
|
|
@ -45,48 +45,6 @@
|
|||
#
|
||||
# The macros are called from the top level CMakeLists.txt
|
||||
#
|
||||
set(QURT_APPS_HEADER ${CMAKE_BINARY_DIR}/apps.h)
|
||||
|
||||
px4_add_git_submodule(TARGET git_dspal PATH "src/lib/dspal")
|
||||
px4_add_git_submodule(TARGET git_eigen32 PATH "src/lib/eigen-3.2")
|
||||
|
||||
function(px4_target_add_modules out_module_directories)
|
||||
list(APPEND ${out_module_directories}
|
||||
./src/platforms/qurt/px4_layer
|
||||
./src/platforms/posix/work_queue
|
||||
PARENT_SCOPE
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(px4_target_validate_config)
|
||||
# FIXME - this can be done in Firmware/CMakeLists.txt
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/qurt)
|
||||
|
||||
if (NOT EXISTS("${CMAKE_SOURCE_DIR}/cmake/qurt/${TARGET_NAME}.cmake"))
|
||||
message(FATAL_ERROR "not implemented yet: ${TARGET_NAME}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(px4_target_firmware)
|
||||
set(installed_targets)
|
||||
add_library(dspal_main SHARED ./src/platforms/qurt/px4_layer/main.cpp)
|
||||
target_link_libraries(dspal_main ${module_list})
|
||||
list(APPEND installed_targets dspal_main)
|
||||
endfunction()
|
||||
|
||||
function(px4_target_rules)
|
||||
#=============================================================================
|
||||
# apps
|
||||
#
|
||||
add_custom_command(OUTPUT ${QURT_APPS_HEADER}
|
||||
COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/Tools/qurt_apps.py > ${QURT_APPS_HEADER}
|
||||
COMMENT "Generating qurt apps"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(qurt_apps DEPENDS ${QURT_APPS_HEADER})
|
||||
endfunction()
|
||||
|
||||
function(px4_target_testing)
|
||||
endfunction()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include(px4_base)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(V_ARCH v5)
|
||||
set(HEXAGON_TOOLS_ROOT /opt/6.4.03)
|
||||
|
@ -33,7 +33,7 @@ set_target_properties(mainapp PROPERTIES LINK_FLAGS ${main_link_flags})
|
|||
|
||||
target_link_libraries(mainapp
|
||||
-Wl,--whole-archive
|
||||
${module_list}
|
||||
${module_libraries}
|
||||
m
|
||||
-Wl,--no-whole-archive
|
||||
-Wl,${TOOLSLIB}/pic/libstdc++.a)
|
||||
|
|
Loading…
Reference in New Issue