Skip to content

Commit

Permalink
vita-headers: Use CMake to find python3.
Browse files Browse the repository at this point in the history
On Unix systems, `python` is typically not available, while on Windows
`python3` is typically not available.
  • Loading branch information
FtZPetruska committed Jun 18, 2023
1 parent c879e24 commit 021a38e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Distributed under the MIT License (http://opensource.org/licenses/MIT)
#

cmake_minimum_required(VERSION 3.2.0)
cmake_minimum_required(VERSION 3.12)

project(vitasdk)

Expand Down Expand Up @@ -70,6 +70,8 @@ endif()
find_package(Git REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

find_package(Python3 REQUIRED COMPONENTS Interpreter)

# Toolchain arch target
set(target_arch arm-vita-eabi)
# Build date
Expand Down Expand Up @@ -508,10 +510,11 @@ ExternalProject_add(vita-headers
GIT_TAG ${HEADERS_TAG}
${GIT_SHALLOW_SUPPORT}
CONFIGURE_COMMAND ""
BUILD_COMMAND VITA_LIBS_GEN=${vita_libs_gen_command}
BUILD_COMMAND ${CMAKE_COMMAND} -E env
VITA_LIBS_GEN=${vita_libs_gen_command}
ARCH=${binutils_prefix}
BYPASS_INSTALL=1
python <SOURCE_DIR>/build.py <BINARY_DIR>
${Python3_EXECUTABLE} <SOURCE_DIR>/build.py <BINARY_DIR>
# Copy the generated .a files to the install directory
INSTALL_COMMAND ${CMAKE_COMMAND} -DGLOB_PATTERN=<BINARY_DIR>/*/*/*a
-DINSTALL_DIR=${CMAKE_INSTALL_PREFIX}/${target_arch}/lib
Expand Down

0 comments on commit 021a38e

Please sign in to comment.