CMakeLists.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Source files and their filters
  2. include(CMakeSources.cmake)
  3. # Includes
  4. set(BansheePhysX_INC
  5. "Include"
  6. "../../Dependencies/PhysX/include"
  7. "../BansheeUtility/Include"
  8. "../BansheeCore/Include")
  9. include_directories(${BansheePhysX_INC})
  10. # Target
  11. add_library(BansheePhysX SHARED ${BS_BANSHEEPHYSX_SRC})
  12. # Defines
  13. target_compile_definitions(BansheePhysX PRIVATE -DBS_PHYSX_EXPORTS)
  14. target_compile_definitions(BansheePhysX PRIVATE $<$<CONFIG:OptimizedDebug>:NDEBUG> $<$<CONFIG:Release>:NDEBUG>)
  15. # Libraries
  16. if(BS_64BIT)
  17. set(BS_PHYSX_SUFFIX _x64)
  18. else()
  19. set(BS_PHYSX_SUFFIX _x86)
  20. endif()
  21. ## External lib: PhysX
  22. if(BS_64BIT)
  23. add_library_per_config_multi(BansheePhysX PhysX PhysX Release/PhysX3_x64 Debug/PhysX3CHECKED_x64)
  24. add_library_per_config_multi(BansheePhysX PhysX3Common PhysX Release/PhysX3Common_x64 Debug/PhysX3CommonCHECKED_x64)
  25. add_library_per_config_multi(BansheePhysX PhysX3Cooking PhysX Release/PhysX3Cooking_x64 Debug/PhysX3CookingCHECKED_x64)
  26. add_library_per_config_multi(BansheePhysX PhysX3CharacterKinematic PhysX Release/PhysX3CharacterKinematic_x64 Debug/PhysX3CharacterKinematicCHECKED_x64)
  27. add_library_per_config_multi(BansheePhysX PhysX3Extensions PhysX Release/PhysX3Extensions Debug/PhysX3ExtensionsCHECKED)
  28. else()
  29. add_library_per_config_multi(BansheePhysX PhysX3 PhysX Release/PhysX3_x86 Debug/PhysX3CHECKED_x86)
  30. add_library_per_config_multi(BansheePhysX PhysX3Common PhysX Release/PhysX3Common_x86 Debug/PhysX3CommonCHECKED_x86)
  31. add_library_per_config_multi(BansheePhysX PhysX3Cooking PhysX Release/PhysX3Cooking_x86 Debug/PhysX3CookingCHECKED_x86)
  32. add_library_per_config_multi(BansheePhysX PhysX3CharacterKinematic PhysX Release/PhysX3CharacterKinematic_x86 Debug/PhysX3CharacterKinematicCHECKED_x86)
  33. add_library_per_config_multi(BansheePhysX PhysX3Extensions PhysX Release/PhysX3Extensions Debug/PhysX3ExtensionsCHECKED)
  34. endif()
  35. ## Local libs
  36. target_link_libraries(BansheePhysX PUBLIC BansheeUtility BansheeCore)
  37. # IDE specific
  38. set_property(TARGET BansheePhysX PROPERTY FOLDER Plugins)