Skip to content

Commit

Permalink
Resolve issue #43 "No rule to make target flightgear_tf-g2".
Browse files Browse the repository at this point in the history
Catch exception in cmake.
  • Loading branch information
kaklik committed Jul 10, 2023
1 parent 646f711 commit 20ae283
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
if(ENABLE_LOCKSTEP_SCHEDULER STREQUAL "no")

find_program(FGFS_PATH "fgfs")
# if the PX4-FlightGear-bridge environment variable FG_BINARY exists, it uses it
if(DEFINED ENV{FG_BINARY})
set(FGFS_PATH $ENV{FG_BINARY})
else()
# if it doesn't exist, the FlightGear "fgfs" program is searched for
find_program(FGFS_PATH "fgfs")
endif()

if(FGFS_PATH)

Expand Down Expand Up @@ -80,5 +86,7 @@ if(ENABLE_LOCKSTEP_SCHEDULER STREQUAL "no")
DEPENDS px4 flightgear_bridge
)
endforeach()
else()
message(FATAL_ERROR "Unable to find the executable FlightGear file!")
endif()
endif()

0 comments on commit 20ae283

Please sign in to comment.