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 804860c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions third_party/mavlink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ 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
if (NOT DEFINED Python_FIND_REGISTRY)
set(Python_FIND_REGISTRY "NEVER")
endif()

find_package(Python3 COMPONENTS Interpreter REQUIRED)

ExternalProject_add(
Expand Down

0 comments on commit 804860c

Please sign in to comment.