diff --git a/Demos/OpenCLClothDemo/MiniCL/CMakeLists.txt b/Demos/OpenCLClothDemo/MiniCL/CMakeLists.txt index e6e216763..df3412bbf 100644 --- a/Demos/OpenCLClothDemo/MiniCL/CMakeLists.txt +++ b/Demos/OpenCLClothDemo/MiniCL/CMakeLists.txt @@ -75,11 +75,12 @@ ELSE(CMAKE_CL_64) ENDIF(CMAKE_CL_64) ENDIF(WIN32) -ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_Mini POST_BUILD +IF(NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_Mini POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenCLClothDemo/amdFlag.bmp ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenCLClothDemo/atiFlag.bmp ${CMAKE_CURRENT_BINARY_DIR} ) - +ENDIF() IF (UNIX) TARGET_LINK_LIBRARIES(AppOpenCLClothDemo_Mini pthread) ENDIF(UNIX) diff --git a/Demos/OpenCLClothDemo/NVidia/CMakeLists.txt b/Demos/OpenCLClothDemo/NVidia/CMakeLists.txt index 244b3566f..82c77f6c0 100644 --- a/Demos/OpenCLClothDemo/NVidia/CMakeLists.txt +++ b/Demos/OpenCLClothDemo/NVidia/CMakeLists.txt @@ -72,12 +72,12 @@ ELSE(CMAKE_CL_64) ENDIF() ENDIF(CMAKE_CL_64) ENDIF(WIN32) - -ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_NVidia POST_BUILD +IF(NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_NVidia POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenCLClothDemo/amdFlag.bmp ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenCLClothDemo/atiFlag.bmp ${CMAKE_CURRENT_BINARY_DIR} ) - +ENDIF() IF (UNIX) TARGET_LINK_LIBRARIES(AppOpenCLClothDemo_NVidia pthread) ENDIF(UNIX) diff --git a/Extras/ConvexDecomposition/CMakeLists.txt b/Extras/ConvexDecomposition/CMakeLists.txt index 4509f4951..693e9d26a 100644 --- a/Extras/ConvexDecomposition/CMakeLists.txt +++ b/Extras/ConvexDecomposition/CMakeLists.txt @@ -1,15 +1,64 @@ INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/Extras/ConvexDecomposition ${BULLET_PHYSICS_SOURCE_DIR}/src ) - -ADD_LIBRARY(ConvexDecomposition - ConvexDecomposition.h bestfitobb.cpp cd_vector.h concavity.h float_math.h planetri.h splitplane.h -ConvexBuilder.cpp bestfitobb.h cd_wavefront.cpp fitsphere.cpp meshvolume.cpp raytri.cpp vlookup.cpp -ConvexBuilder.h bestfit.cpp cd_hull.cpp cd_wavefront.h fitsphere.h meshvolume.h raytri.h vlookup.h -ConvexDecomposition.cpp bestfit.h cd_hull.h concavity.cpp float_math.cpp planetri.cpp splitplane.cpp +SET(ConvexDecomposition_SRCS + bestfitobb.cpp + ConvexBuilder.cpp + cd_wavefront.cpp + fitsphere.cpp + meshvolume.cpp + raytri.cpp + vlookup.cpp + bestfit.cpp + cd_hull.cpp + ConvexDecomposition.cpp + concavity.cpp + float_math.cpp + planetri.cpp + splitplane.cpp ) +SET(ConvexDecomposition_HDRS + ConvexDecomposition.h + cd_vector.h + concavity.h + bestfitobb.h + ConvexBuilder.h + cd_wavefront.h + fitsphere.h + meshvolume.h + raytri.h + vlookup.h + bestfit.h + cd_hull.h +) + +ADD_LIBRARY(ConvexDecomposition ${ConvexDecomposition_SRCS} ${ConvexDecomposition_HDRS}) +SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES VERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES SOVERSION ${BULLET_VERSION}) + IF (BUILD_SHARED_LIBS) TARGET_LINK_LIBRARIES(ConvexDecomposition BulletCollision LinearMath) ENDIF (BUILD_SHARED_LIBS) + +IF (INSTALL_EXTRA_LIBS) + IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS ConvexDecomposition DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS ConvexDecomposition DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN +".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES PUBLIC_HEADER "${ConvexDecomposition_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) +ENDIF (INSTALL_EXTRA_LIBS) diff --git a/Extras/GIMPACTUtils/CMakeLists.txt b/Extras/GIMPACTUtils/CMakeLists.txt index e33f7197d..5c9480a97 100644 --- a/Extras/GIMPACTUtils/CMakeLists.txt +++ b/Extras/GIMPACTUtils/CMakeLists.txt @@ -8,7 +8,30 @@ ${BULLET_PHYSICS_SOURCE_DIR}/Extras/ConvexDecomposition ADD_LIBRARY(GIMPACTUtils btGImpactConvexDecompositionShape.cpp btGImpactConvexDecompositionShape.h ) +SET_TARGET_PROPERTIES(GIMPACTUtils PROPERTIES VERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(GIMPACTUtils PROPERTIES SOVERSION ${BULLET_VERSION}) IF (BUILD_SHARED_LIBS) TARGET_LINK_LIBRARIES(GIMPACTUtils ConvexDecomposition BulletCollision) ENDIF (BUILD_SHARED_LIBS) + +IF (INSTALL_EXTRA_LIBS) + IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS GIMPACTUtils DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS GIMPACTUtils DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN +".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + SET_TARGET_PROPERTIES(GIMPACTUtils PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(GIMPACTUtils PROPERTIES PUBLIC_HEADER "btGImpactConvexDecompositionShape.h") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) +ENDIF (INSTALL_EXTRA_LIBS) diff --git a/src/LinearMath/btQuickprof.cpp b/src/LinearMath/btQuickprof.cpp index 31b88c390..14534068a 100644 --- a/src/LinearMath/btQuickprof.cpp +++ b/src/LinearMath/btQuickprof.cpp @@ -87,6 +87,19 @@ btClock::~btClock() delete m_data; } +btClock::btClock(const btClock& other) +{ + m_data = new btClockData; + *m_data = *other.m_data; +} + +btClock& btClock::operator=(const btClock& other) +{ + *m_data = *other.m_data; + return *this; +} + + /// Resets the initial reference time. void btClock::reset() { diff --git a/src/LinearMath/btQuickprof.h b/src/LinearMath/btQuickprof.h index 5fb33e407..adfbbe614 100644 --- a/src/LinearMath/btQuickprof.h +++ b/src/LinearMath/btQuickprof.h @@ -37,6 +37,9 @@ class btClock public: btClock(); + btClock(const btClock& other); + btClock& operator=(const btClock& other); + ~btClock(); /// Resets the initial reference time. diff --git a/src/LinearMath/btVector3.h b/src/LinearMath/btVector3.h index 6d42c3527..068e87c94 100644 --- a/src/LinearMath/btVector3.h +++ b/src/LinearMath/btVector3.h @@ -171,10 +171,10 @@ public: /**@brief Return a normalized version of this vector */ SIMD_FORCE_INLINE btVector3 normalized() const; - /**@brief Rotate this vector + /**@brief Return a rotated version of this vector * @param wAxis The axis to rotate about * @param angle The angle to rotate by */ - SIMD_FORCE_INLINE btVector3 rotate( const btVector3& wAxis, const btScalar angle ); + SIMD_FORCE_INLINE btVector3 rotate( const btVector3& wAxis, const btScalar angle ) const; /**@brief Return the angle between this and another vector * @param v The other vector */ @@ -491,7 +491,7 @@ SIMD_FORCE_INLINE btVector3 btVector3::normalized() const return *this / length(); } -SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar angle ) +SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar angle ) const { // wAxis must be a unit lenght vector