forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Running the make px4_sitl_nolockstep flightgear_tf-g2 or similar px4_sitl_nolockstep targets like flightgear_tf-g1 or flightgear_tf-rascal results in the following error in case the fgfs binary is not found by cmake:
PX4-Autopilot> make px4_sitl_nolockstep flightgear_tf-g2
make[1]: * No rule to make target `flightgear_tf-g2'. Stop.
make: * [px4_sitl_nolockstep] Error 2
Issue is coused by uncath failure of find_program(FGFS_PATH "fgfs") in the file /src/modules/simulation/simulator_mavlink/sitl_targets_flightgear.cmake
Expected behavior
I suggest that cmake use the system variable from PX4-FlightGear-Bridge FG_BINARY (if it exists) and when it doesn't, use the current search function find_program(FGFS_PATH "fgfs"). If that doesn't work either, cmake should end with a clear error, not pretend that it's OK, and at the same time not prepare the target.
Temporary workaround
use the alias to FlightGear starting script (limited use)
alias fgfs=/home/[user]/flightgear/dnc-managed/run_fgfs.sh