From b49d9fba5e0aadfbc93acc90a554ecf7629adb8c Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Fri, 5 Jul 2024 21:13:11 -0700 Subject: [PATCH] FindPhysX should search specific lib names first This resolves an issue where PhysX libraries installed with generic names at a system level were being found preferentially ahead of the ones created by vcpkg. --- cmake/FindPhysX.cmake | 84 +++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/cmake/FindPhysX.cmake b/cmake/FindPhysX.cmake index 3c2a6d53bd..9e69582834 100644 --- a/cmake/FindPhysX.cmake +++ b/cmake/FindPhysX.cmake @@ -8,74 +8,74 @@ else() endif() set(_PHYSX_COMMON_LIBRARY_NAMES - PhysXCommon - PhysXCommon_static - PhysXCommon_${_PHYSX_LIBRARY_SUFFIX} PhysXCommon_static_${_PHYSX_LIBRARY_SUFFIX} - libPhysXCommon - libPhysXCommon_static - libPhysXCommon_${_PHYSX_LIBRARY_SUFFIX} + PhysXCommon_${_PHYSX_LIBRARY_SUFFIX} + PhysXCommon_static + PhysXCommon libPhysXCommon_static_${_PHYSX_LIBRARY_SUFFIX} + libPhysXCommon_${_PHYSX_LIBRARY_SUFFIX} + libPhysXCommon_static + libPhysXCommon ) set(_PHYSX_PHYSICS_LIBRARY_NAMES - PhysX - PhysX_static - PhysX_${_PHYSX_LIBRARY_SUFFIX} PhysX_static_${_PHYSX_LIBRARY_SUFFIX} - libPhysX - libPhysX_static - libPhysX_${_PHYSX_LIBRARY_SUFFIX} + PhysX_${_PHYSX_LIBRARY_SUFFIX} + PhysX_static + PhysX libPhysX_static_${_PHYSX_LIBRARY_SUFFIX} + libPhysX_${_PHYSX_LIBRARY_SUFFIX} + libPhysX_static + libPhysX ) set(_PHYSX_FOUNDATION_LIBRARY_NAMES - PhysXFoundation - PhysXFoundation_static - PhysXFoundation_${_PHYSX_LIBRARY_SUFFIX} PhysXFoundation_static_${_PHYSX_LIBRARY_SUFFIX} - libPhysXFoundation - libPhysXFoundation_static - libPhysXFoundation_${_PHYSX_LIBRARY_SUFFIX} + PhysXFoundation_${_PHYSX_LIBRARY_SUFFIX} + PhysXFoundation_static + PhysXFoundation libPhysXFoundation_static_${_PHYSX_LIBRARY_SUFFIX} + libPhysXFoundation_${_PHYSX_LIBRARY_SUFFIX} + libPhysXFoundation_static + libPhysXFoundation ) set(_PHYSX_COOKING_LIBRARY_NAMES - PhysXCooking - PhysXCooking_static - PhysXCooking_${_PHYSX_LIBRARY_SUFFIX} PhysXCooking_static_${_PHYSX_LIBRARY_SUFFIX} - libPhysXCooking - libPhysXCooking_static - libPhysXCooking_${_PHYSX_LIBRARY_SUFFIX} + PhysXCooking_${_PHYSX_LIBRARY_SUFFIX} + PhysXCooking_static + PhysXCooking libPhysXCooking_static_${_PHYSX_LIBRARY_SUFFIX} + libPhysXCooking_${_PHYSX_LIBRARY_SUFFIX} + libPhysXCooking_static + libPhysXCooking ) set(_PHYSX_EXTENSIONS_LIBRARY_NAMES - PhysXExtensions - PhysXExtensions_static - PhysXExtensions_${_PHYSX_LIBRARY_SUFFIX} PhysXExtensions_static_${_PHYSX_LIBRARY_SUFFIX} - libPhysXExtensions - libPhysXExtensions_static - libPhysXExtensions_${_PHYSX_LIBRARY_SUFFIX} + PhysXExtensions_${_PHYSX_LIBRARY_SUFFIX} + PhysXExtensions_static + PhysXExtensions libPhysXExtensions_static_${_PHYSX_LIBRARY_SUFFIX} + libPhysXExtensions_${_PHYSX_LIBRARY_SUFFIX} + libPhysXExtensions_static + libPhysXExtensions ) set(_PHYSX_CHARACTER_LIBRARY_NAMES - PhysXCharacterKinematic - PhysXCharacterKinematic_static - PhysXCharacterKinematic_${_PHYSX_LIBRARY_SUFFIX} PhysXCharacterKinematic_static_${_PHYSX_LIBRARY_SUFFIX} - libPhysXCharacterKinematic - libPhysXCharacterKinematic_static - libPhysXCharacterKinematic_${_PHYSX_LIBRARY_SUFFIX} + PhysXCharacterKinematic_${_PHYSX_LIBRARY_SUFFIX} + PhysXCharacterKinematic_static + PhysXCharacterKinematic libPhysXCharacterKinematic_static_${_PHYSX_LIBRARY_SUFFIX} + libPhysXCharacterKinematic_${_PHYSX_LIBRARY_SUFFIX} + libPhysXCharacterKinematic_static + libPhysXCharacterKinematic ) set(_PHYSX_PVD_LIBRARY_NAMES - PhysXPvdSDK - PhysXPvdSDK_static - PhysXPvdSDK_${_PHYSX_LIBRARY_SUFFIX} PhysXPvdSDK_static_${_PHYSX_LIBRARY_SUFFIX} - libPhysXPvdSDK - libPhysXPvdSDK_static - libPhysXPvdSDK_${_PHYSX_LIBRARY_SUFFIX} + PhysXPvdSDK_${_PHYSX_LIBRARY_SUFFIX} + PhysXPvdSDK_static + PhysXPvdSDK libPhysXPvdSDK_static_${_PHYSX_LIBRARY_SUFFIX} + libPhysXPvdSDK_${_PHYSX_LIBRARY_SUFFIX} + libPhysXPvdSDK_static + libPhysXPvdSDK ) # Stoopid vcpkg build debug and optimized libraries with the same name but in different directories.