Browse Source

CMake: Fix Bullet building under clang-cl

Sam Edwards 6 years ago
parent
commit
4000199acb
1 changed files with 5 additions and 0 deletions
  1. 5 0
      panda/src/bullet/CMakeLists.txt

+ 5 - 0
panda/src/bullet/CMakeLists.txt

@@ -114,6 +114,11 @@ set_target_properties(p3bullet PROPERTIES DEFINE_SYMBOL BUILDING_PANDABULLET)
 target_link_libraries(p3bullet panda PKG::BULLET)
 target_link_libraries(p3bullet panda PKG::BULLET)
 target_interrogate(p3bullet ALL)
 target_interrogate(p3bullet ALL)
 
 
+if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  # Clang emulating MSVC; it has builtin defines for __m128 + __m128 and co.
+  target_compile_definitions(p3bullet PUBLIC BT_NO_SIMD_OPERATOR_OVERLOADS)
+endif()
+
 install(TARGETS p3bullet
 install(TARGETS p3bullet
   EXPORT Bullet COMPONENT Bullet
   EXPORT Bullet COMPONENT Bullet
   DESTINATION ${CMAKE_INSTALL_LIBDIR}
   DESTINATION ${CMAKE_INSTALL_LIBDIR}