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