-
|
I want to build an Android so file using the latest source code of PhysX 5. Through continuous consultation with GPT, I obtained the following script: @echo off
setlocal
REM ==== user config ====
set NDK_PATH=D:\\Android\\AndroidNDK\\android-ndk-r23c
set PHYSX_PATH=F:\\OpenSource\\PhysXEngine\\physx
REM set BUILD_PATH=%PHYSX_PATH%\\build_android_arm64
set BUILD_PATH=F:\\OpenSource\\PhysXEngine\\build_android_arm64
set ABI=arm64-v8a
set API_LEVEL=21
set CMAKE_GENERATOR=Ninja
REM ==== output ====
echo [INFO] use NDK: %NDK_PATH%
echo [INFO] PhysX source root: %PHYSX_PATH%
echo [INFO] build dir: %BUILD_PATH%
echo [INFO] ABI: %ABI%, API Level: %API_LEVEL%
echo [INFO] generator: %CMAKE_GENERATOR%
REM ==== make dir ====
if not exist "%BUILD_PATH%" (
mkdir "%BUILD_PATH%"
)
cd /d "%BUILD_PATH%"
REM ==== CMake config ====
cmake ^
-G %CMAKE_GENERATOR% ^
-DCMAKE_TOOLCHAIN_FILE=%NDK_PATH%\\build\\cmake\\android.toolchain.cmake ^
-DANDROID_ABI=%ABI% ^
-DANDROID_PLATFORM=android-%API_LEVEL% ^
-DANDROID_STL=c++_shared ^
-DPHYSX_BUILD_ANDROID=ON ^
-DPX_BUILD_PHYSX=ON ^
-DPX_BUILD_PVDRUNTIME=ON ^
-DPX_GENERATE_STATIC_LIBRARIES=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
rem -DPHYSX_ROOT_DIR=%PHYSX_PATH% ^
rem -DPX_OUTPUT_LIB_DIR=%BUILD_PATH%\\lib ^
rem -DPX_OUTPUT_BIN_DIR=%BUILD_PATH%\\bin ^
%PHYSX_PATH%\\compiler\\public
if errorlevel 1 (
echo [ERROR] CMake config failed
exit /b 1
)
echo start compile....
REM ==== start compile ====
cmake --build . --config Release
if errorlevel 1 (
echo [ERROR] compile failed
exit /b 1
)
echo [INFO] compile succeeded
echo [INFO] out dir: %BUILD_PATH%
endlocal
pause,but the build still fails—it seems like CMake is recursing. Can anyone help me? |
Beta Was this translation helpful? Give feedback.
Answered by
eschan145
Oct 23, 2025
Replies: 1 comment 3 replies
-
|
The latest PhysX from this repository does not support the android platform, if you want to use PhysX on platforms other than Windows and Linux you will need to use the o3de fork at https://github.com/o3de/PhysX. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
johnson3d
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The latest PhysX from this repository does not support the android platform, if you want to use PhysX on platforms other than Windows and Linux you will need to use the o3de fork at https://github.com/o3de/PhysX.