Skip to content

Commit

Permalink
FindPhysX should search specific lib names first
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dpogue committed Jul 6, 2024
1 parent 04c72ac commit b49d9fb
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions cmake/FindPhysX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b49d9fb

Please sign in to comment.