Skip to content

Commit

Permalink
core/CMakeLists: change how Python links to Scopy on arm architectures
Browse files Browse the repository at this point in the history
Signed-off-by: Bindea Cristian <[email protected]>
  • Loading branch information
bindea-cristian committed Nov 13, 2024
1 parent bf168ee commit e274acb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions ci/arm/arm_build_process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ build_scopy() {
CURRENT_BUILD_CMAKE_OPTS="\
-DENABLE_PLUGIN_TEST=ON \
-DENABLE_TESTING=ON \
-DPYTHON_EXECUTABLE=$SYSROOT/bin/python3 \
"
build_with_cmake
popd
Expand Down
11 changes: 5 additions & 6 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,14 @@ if(${WITH_PYTHON})
endif()

if(CMAKE_SYSTEM_PROCESSOR MATCHES arm)
find_package(Python3 3.9 EXACT REQUIRED COMPONENTS Interpreter)
message(STATUS "Host Python Interpreter " ${Python3_EXECUTABLE})
set(Python3_EXECUTABLE ${CMAKE_SYSROOT}/bin/python3.9)
message(STATUS "Target Python Interpreter " ${Python3_EXECUTABLE})
find_package(Python3 REQUIRED COMPONENTS Development)
else()
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
message(STATUS "Python Interpreter " ${Python3_EXECUTABLE})
message(STATUS "Python Libraries " ${Python3_LIBRARIES})
endif()

message(STATUS "Python Interpreter " ${Python3_EXECUTABLE})
message(STATUS "Python Libraries " ${Python3_LIBRARIES})

set(PYTHON_VERSION python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} CACHE STRING "PYTHON_USED")
set(PYTHON_VERSION ${PYTHON_VERSION} PARENT_SCOPE)
if(NOT Python3_FOUND)
Expand Down

0 comments on commit e274acb

Please sign in to comment.