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 19, 2024
1 parent a59ce63 commit fc8cc9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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 @@ -306,6 +306,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
13 changes: 6 additions & 7 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,15 @@ if(${WITH_PYTHON})
message(STATUS "Using default Python EXECUTABLE")
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})
if(CMAKE_SYSTEM_PROCESSOR MATCHES arm OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)
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 fc8cc9c

Please sign in to comment.