Skip to content

Commit

Permalink
Fix Focal logic to enable DART fork automatically
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Jul 6, 2021
1 parent e589ae4 commit 103c7f3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,18 @@ ign_find_package(sdformat10

# respect user explicit values and also provide a default value for Ubuntu Focal
# to make ground vehicles to work properly
set(DEFAULT_VENDOR_DART:BOOL OFF)
set(DEFAULT_VENDOR_DART OFF)
if(NOT DEFINED USE_VENDOR_DART)
find_program(LSB_RELEASE_EXEC lsb_release)

if(LSB_RELEASE_EXEC)
execute_process(COMMAND ${LSB_RELEASE_EXEC} -rs
OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE)
if (LSB_RELEASE_ID_SHORT == "20.04")
message(STATUS "DETECTED Ubuntu 20.04, default USE_VENDOR_DART set to ON"
"to make ground vehicles to work properly")
set(DEFAULT_VENDOR_DART:BOOL ON)
OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(LSB_RELEASE_ID_SHORT STREQUAL "20.04")
message(STATUS "DETECTED Ubuntu 20.04, default USE_VENDOR_DART set to "
"ON to make ground vehicles to work properly")
set(DEFAULT_VENDOR_DART ON)
endif()
endif()
endif()
Expand Down

0 comments on commit 103c7f3

Please sign in to comment.