Skip to content

Commit

Permalink
[v1.4] fix mavlink build in macOS CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin committed Nov 16, 2023
1 parent 958441c commit 7acbbd1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions third_party/mavlink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ list(APPEND CMAKE_ARGS
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
)

# Without this GitHub actions picks the wrong python3 executable.
set(Python3_FIND_REGISTRY "NEVER")
set(Python3_FIND_FRAMEWORK "NEVER")
if (POLICY CMP0094)
cmake_policy(SET CMP0094 NEW) # FindPython should return the first matching Python
endif ()

# Needed to find the right Python on macOS
if (NOT DEFINED Python_FIND_FRAMEWORK)
set(Python_FIND_FRAMEWORK "LAST")
endif()

# Needed to find the right Python on Windows
set(Python_FIND_REGISTRY "LAST")

find_package(Python3 COMPONENTS Interpreter REQUIRED)

ExternalProject_add(
Expand Down

0 comments on commit 7acbbd1

Please sign in to comment.