FindPhysX.cmake 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Find PhysX
  2. #
  3. # This module defines
  4. # PhysX_INCLUDE_DIRS
  5. # PhysX_LIBRARIES
  6. # PhysX_FOUND
  7. start_find_package(PhysX)
  8. set(PhysX_INSTALL_DIR ${PROJECT_SOURCE_DIR}/../Dependencies/PhysX CACHE PATH "")
  9. gen_default_lib_search_dirs(PhysX)
  10. if(NOT APPLE)
  11. if(BS_64BIT)
  12. set(BS_PHYSX_SUFFIX _x64)
  13. else()
  14. set(BS_PHYSX_SUFFIX _x86)
  15. endif()
  16. endif()
  17. find_imported_includes(PhysX PxPhysics.h)
  18. if(NOT APPLE)
  19. find_imported_library_shared2(PhysX PhysX3${BS_PHYSX_SUFFIX} PhysX3CHECKED${BS_PHYSX_SUFFIX})
  20. find_imported_library_shared2(PhysX PhysX3Common${BS_PHYSX_SUFFIX} PhysX3CommonCHECKED${BS_PHYSX_SUFFIX})
  21. find_imported_library_shared2(PhysX PhysX3Cooking${BS_PHYSX_SUFFIX} PhysX3CookingCHECKED${BS_PHYSX_SUFFIX})
  22. find_imported_library_shared2(PhysX PhysX3CharacterKinematic${BS_PHYSX_SUFFIX} PhysX3CharacterKinematicCHECKED${BS_PHYSX_SUFFIX})
  23. find_imported_library2(PhysX PhysX3Extensions PhysX3ExtensionsCHECKED)
  24. else()
  25. find_imported_library(PhysX LowLevel)
  26. find_imported_library(PhysX LowLevelCloth)
  27. find_imported_library(PhysX PhysX3)
  28. find_imported_library(PhysX PhysX3Common)
  29. find_imported_library(PhysX PhysX3Cooking)
  30. find_imported_library(PhysX PhysX3CharacterKinematic)
  31. find_imported_library(PhysX PhysX3Extensions)
  32. find_imported_library(PhysX PhysXProfileSDK)
  33. find_imported_library(PhysX PvdRuntime)
  34. find_imported_library(PhysX PxTask)
  35. find_imported_library(PhysX SceneQuery)
  36. find_imported_library(PhysX SimulationController)
  37. endif()
  38. install_dependency_binaries(PhysX)
  39. end_find_package(PhysX PhysX3${BS_PHYSX_SUFFIX})