Skip to content

Modify CMakeModules package Packman downloads to include Android, iOS and Mac platforms #59

@moraaar

Description

@moraaar

The name of the bin folders will be incorrect when building for Android, iOS and Mac-arm64.

To fix this nVidia has to modify the CMakeModules package it's downloaded from packman when building PhysX, since it's not part of the Github repo.

The file that needs to be modified is GetCompilerAndPlatform.cmake, changing the if condition inside GetPlatformBinName function to this:

	ELSEIF(TARGET_BUILD_PLATFORM STREQUAL "mac")
		IF(${PX_OUTPUT_ARCH} STREQUAL "x86")
			SET(RETVAL "mac.x86_${LIBPATH_SUFFIX}")
		ELSEIF(${PX_OUTPUT_ARCH} STREQUAL "arm")
			SET(RETVAL "mac.arm64")
		ENDIF()
	ELSEIF(TARGET_BUILD_PLATFORM STREQUAL "ios")
		SET(RETVAL "ios.arm_${LIBPATH_SUFFIX}")
	ELSEIF(TARGET_BUILD_PLATFORM STREQUAL "android")
		SET(RETVAL "android.${ANDROID_ABI}")

This code modification was tested locally on these PRs: #40 #49 #51

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions