Imported Upstream version 2.81
[platform/upstream/libbullet.git] / src / LinearMath / CMakeLists.txt
1
2 INCLUDE_DIRECTORIES(
3         ${BULLET_PHYSICS_SOURCE_DIR}/src
4 )
5
6 SET(LinearMath_SRCS
7         btAlignedAllocator.cpp
8         btConvexHull.cpp
9         btConvexHullComputer.cpp
10         btGeometryUtil.cpp
11         btPolarDecomposition.cpp
12         btQuickprof.cpp
13         btSerializer.cpp
14         btVector3.cpp
15 )
16
17 SET(LinearMath_HDRS
18         btAabbUtil2.h
19         btAlignedAllocator.h
20         btAlignedObjectArray.h
21         btConvexHull.h
22         btConvexHullComputer.h
23         btDefaultMotionState.h
24         btGeometryUtil.h
25         btGrahamScan2dConvexHull.h
26         btHashMap.h
27         btIDebugDraw.h
28         btList.h
29         btMatrix3x3.h
30         btMinMax.h
31         btMotionState.h
32         btPolarDecomposition.h
33         btPoolAllocator.h
34         btQuadWord.h
35         btQuaternion.h
36         btQuickprof.h
37         btRandom.h
38         btScalar.h
39         btSerializer.h
40         btStackAlloc.h
41         btTransform.h
42         btTransformUtil.h
43         btVector3.h
44 )
45
46 ADD_LIBRARY(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS})
47 SET_TARGET_PROPERTIES(LinearMath PROPERTIES VERSION ${BULLET_VERSION})
48 SET_TARGET_PROPERTIES(LinearMath PROPERTIES SOVERSION ${BULLET_VERSION})
49
50 IF (INSTALL_LIBS)
51         IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
52                 #FILES_MATCHING requires CMake 2.6
53                 IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
54                         IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
55                                 INSTALL(TARGETS LinearMath DESTINATION .)
56                         ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
57                                 INSTALL(TARGETS LinearMath DESTINATION lib${LIB_SUFFIX})
58                                 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
59 DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h"  PATTERN
60 ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
61                         ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
62                 ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
63
64                 IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
65                         SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true)
66                         SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}")
67                 ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
68         ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
69 ENDIF (INSTALL_LIBS)