1 INCLUDE_DIRECTORIES( 2 ${BULLET_PHYSICS_SOURCE_DIR}/src 3 ) 4 5 SET(BulletFileLoader_SRCS 6 bChunk.cpp 7 bDNA.cpp 8 bFile.cpp 9 btBulletFile.cpp 10 ) 11 12 SET(BulletFileLoader_HDRS 13 bChunk.h 14 bCommon.h 15 bDefines.h 16 bDNA.h 17 bFile.h 18 btBulletFile.h 19 ) 20 21 ADD_LIBRARY(BulletFileLoader ${BulletFileLoader_SRCS} ${BulletFileLoader_HDRS}) 22 23 IF (BUILD_SHARED_LIBS) 24 TARGET_LINK_LIBRARIES(BulletFileLoader LinearMath) 25 ENDIF (BUILD_SHARED_LIBS) 26 27 SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES VERSION ${BULLET_VERSION}) 28 SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES SOVERSION ${BULLET_VERSION}) 29 30 IF (INSTALL_EXTRA_LIBS) 31 IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) 32 #FILES_MATCHING requires CMake 2.6 33 IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 34 IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 35 INSTALL(TARGETS BulletFileLoader DESTINATION .) 36 ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 37 INSTALL(TARGETS BulletFileLoader DESTINATION lib${LIB_SUFFIX}) 38 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 39 DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN 40 ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) 41 ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 42 ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 43 44 IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 45 SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES FRAMEWORK true) 46 SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES PUBLIC_HEADER "${BulletFileLoader_HDRS}") 47 ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 48 ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) 49 ENDIF (INSTALL_EXTRA_LIBS) 50