px4-firmware/src/firmware/posix/CMakeLists.txt

86 lines
2.0 KiB
CMake
Raw Normal View History

2015-09-08 21:50:18 -03:00
include_directories(${CMAKE_CURRENT_BINARY_DIR})
px4_posix_generate_builtin_commands(
OUT apps.h
2015-09-10 00:00:58 -03:00
MODULE_LIST ${module_libraries})
if ("${BOARD}" STREQUAL "eagle")
FASTRPC_STUB_GEN(../qurt/px4muorb.idl)
2015-09-08 21:50:18 -03: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
-Wl,--start-group
${module_libraries}
df_driver_framework
${df_driver_libraries}
pthread m rt
-Wl,--end-group
)
else()
add_executable(mainapp
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
apps.h
)
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()
endif()
2015-09-08 16:18:59 -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}"
"${config_sitl_viewer}" "${config_sitl_model}" "${CMAKE_BINARY_DIR}"
2015-10-24 11:57:46 -03:00
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
USES_TERMINAL
2015-10-24 11:57:46 -03:00
)
add_dependencies(run_config mainapp)
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)
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()
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 :