2015-09-08 20:50:18 -04:00
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
2015-09-08 15:39:13 -07:00
|
|
|
px4_posix_generate_builtin_commands(
|
2015-09-08 19:17:53 -07:00
|
|
|
OUT apps.h
|
2015-09-09 23:00:58 -04:00
|
|
|
MODULE_LIST ${module_libraries})
|
2015-09-08 15:39:13 -07:00
|
|
|
|
2016-01-18 23:16:31 -08:00
|
|
|
if ("${BOARD}" STREQUAL "eagle")
|
|
|
|
|
FASTRPC_STUB_GEN(../qurt/px4muorb.idl)
|
2015-09-08 20:50:18 -04:00
|
|
|
|
2016-01-20 21:09:37 -08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes -Wno-missing-declarations")
|
2016-01-18 23:16:31 -08:00
|
|
|
QURT_APP(
|
|
|
|
|
APP_NAME mainapp
|
|
|
|
|
IDL_NAME px4muorb
|
|
|
|
|
APPS_DEST "/home/linaro"
|
|
|
|
|
SOURCES
|
2016-01-20 21:09:37 -08:00
|
|
|
px4muorb_stub.c
|
2016-01-18 23:16:31 -08:00
|
|
|
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
|
|
|
|
apps.h
|
|
|
|
|
LINK_LIBS
|
2015-09-12 11:25:48 +02:00
|
|
|
-Wl,--start-group
|
|
|
|
|
${module_libraries}
|
2015-11-03 01:24:02 -08:00
|
|
|
df_driver_framework
|
2016-02-09 01:19:50 -08:00
|
|
|
${df_driver_libs}
|
2016-01-20 21:09:37 -08:00
|
|
|
${FASTRPC_ARM_LIBS}
|
2015-09-12 11:25:48 +02:00
|
|
|
pthread m rt
|
|
|
|
|
-Wl,--end-group
|
|
|
|
|
)
|
2016-04-01 11:36:27 +02:00
|
|
|
|
|
|
|
|
px4_add_adb_push(OUT upload
|
|
|
|
|
OS ${OS}
|
|
|
|
|
BOARD ${BOARD}
|
|
|
|
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config
|
|
|
|
|
DEPENDS build_mainapp_apps
|
|
|
|
|
DEST /home/linaro)
|
|
|
|
|
|
2015-09-12 11:25:48 +02:00
|
|
|
else()
|
2016-01-18 23:16:31 -08:00
|
|
|
add_executable(mainapp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
|
|
|
|
apps.h
|
2015-10-19 14:46:18 -07:00
|
|
|
)
|
2016-02-09 00:42:59 -08:00
|
|
|
if (NOT APPLE)
|
2016-01-18 23:16:31 -08:00
|
|
|
target_link_libraries(mainapp
|
|
|
|
|
-Wl,--start-group
|
|
|
|
|
${module_libraries}
|
|
|
|
|
df_driver_framework
|
2016-02-09 01:19:50 -08:00
|
|
|
${df_driver_libs}
|
2016-01-18 23:16:31 -08:00
|
|
|
pthread m rt
|
|
|
|
|
-Wl,--end-group
|
|
|
|
|
)
|
|
|
|
|
else()
|
|
|
|
|
target_link_libraries(mainapp
|
|
|
|
|
${module_libraries}
|
|
|
|
|
df_driver_framework
|
2016-02-09 01:19:50 -08:00
|
|
|
${df_driver_libs}
|
2016-01-18 23:16:31 -08:00
|
|
|
pthread m
|
|
|
|
|
)
|
|
|
|
|
endif()
|
2015-09-12 11:25:48 +02:00
|
|
|
endif()
|
2015-09-08 15:18:59 -04:00
|
|
|
|
2015-10-25 11:18:14 -04:00
|
|
|
add_custom_target(run_config
|
2015-10-24 10:57:46 -04:00
|
|
|
COMMAND Tools/sitl_run.sh "${config_sitl_rcS}" "${config_sitl_debugger}"
|
2015-10-29 10:35:35 +01:00
|
|
|
"${config_sitl_viewer}" "${config_sitl_model}" "${CMAKE_BINARY_DIR}"
|
2015-10-24 10:57:46 -04:00
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
2015-10-25 11:20:28 +01:00
|
|
|
USES_TERMINAL
|
2015-10-24 10:57:46 -04:00
|
|
|
)
|
2015-10-25 11:18:14 -04:00
|
|
|
add_dependencies(run_config mainapp)
|
|
|
|
|
|
2016-01-28 22:27:49 +01:00
|
|
|
foreach(viewer none jmavsim gazebo replay)
|
2015-11-06 21:11:54 -05:00
|
|
|
foreach(debugger none gdb lldb ddd valgrind)
|
2016-03-11 16:39:02 +01:00
|
|
|
foreach(model none iris iris_opt_flow tailsitter standard_vtol plane)
|
2015-10-29 10:35:35 +01:00
|
|
|
if (debugger STREQUAL "none")
|
|
|
|
|
if (model STREQUAL "none")
|
|
|
|
|
set(_targ_name "${viewer}")
|
|
|
|
|
else()
|
|
|
|
|
set(_targ_name "${viewer}_${model}")
|
|
|
|
|
endif()
|
|
|
|
|
else()
|
|
|
|
|
if (model STREQUAL "none")
|
|
|
|
|
set(_targ_name "${viewer}___${debugger}")
|
|
|
|
|
else()
|
|
|
|
|
set(_targ_name "${viewer}_${model}_${debugger}")
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
add_custom_target(${_targ_name}
|
|
|
|
|
COMMAND Tools/sitl_run.sh "${config_sitl_rcS}"
|
|
|
|
|
"${debugger}"
|
|
|
|
|
"${viewer}" "${model}" "${CMAKE_BINARY_DIR}"
|
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
|
|
|
USES_TERMINAL
|
|
|
|
|
)
|
|
|
|
|
add_dependencies(${_targ_name} mainapp)
|
|
|
|
|
endforeach()
|
2015-10-25 11:18:14 -04:00
|
|
|
endforeach()
|
|
|
|
|
endforeach()
|
2015-10-24 10:57:46 -04:00
|
|
|
|
2015-09-08 15:18:59 -04:00
|
|
|
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|