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-01-19 03:16:31 -04:00
|
|
|
if ("${BOARD}" STREQUAL "eagle")
|
|
|
|
FASTRPC_STUB_GEN(../qurt/px4muorb.idl)
|
2015-09-08 21:50:18 -03:00
|
|
|
|
2016-01-19 03:16:31 -04:00
|
|
|
QURT_APP(
|
|
|
|
APP_NAME mainapp
|
|
|
|
IDL_NAME px4muorb
|
|
|
|
APPS_DEST "/home/linaro"
|
|
|
|
SOURCES
|
|
|
|
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
|
|
|
apps.h
|
|
|
|
LINK_LIBS
|
2015-09-12 06:25:48 -03:00
|
|
|
-Wl,--start-group
|
|
|
|
${module_libraries}
|
2015-11-03 05:24:02 -04:00
|
|
|
df_driver_framework
|
|
|
|
${df_driver_libraries}
|
2015-09-12 06:25:48 -03:00
|
|
|
pthread m rt
|
|
|
|
-Wl,--end-group
|
|
|
|
)
|
|
|
|
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-01-19 03:16:31 -04:00
|
|
|
if (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" AND NOT APPLE)
|
|
|
|
target_link_libraries(mainapp
|
|
|
|
-Wl,--start-group
|
|
|
|
${module_libraries}
|
|
|
|
df_driver_framework
|
|
|
|
${df_driver_libraries}
|
|
|
|
pthread m rt
|
|
|
|
-Wl,--end-group
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
target_link_libraries(mainapp
|
|
|
|
${module_libraries}
|
|
|
|
df_driver_framework
|
|
|
|
${df_driver_libraries}
|
|
|
|
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)
|
|
|
|
|
2015-10-29 06:35:35 -03:00
|
|
|
foreach(viewer none jmavsim gazebo)
|
2015-11-06 22:11:54 -04:00
|
|
|
foreach(debugger none gdb lldb ddd valgrind)
|
2016-02-07 08:00:03 -04:00
|
|
|
foreach(model none iris iris_opt_flow tailsitter standard_vtol)
|
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 :
|