updated CMake support: remove Lib prefix, to facilitate Apple Framework support, add App prefix for demos

See discussion here: http://code.google.com/p/bullet/issues/detail?id=129
This commit is contained in:
erwin.coumans
2008-11-06 06:54:35 +00:00
parent 108c88af41
commit 2daf428386
33 changed files with 88 additions and 93 deletions

View File

@@ -3,14 +3,14 @@ INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src }
)
SET(LibLinearMath_SRCS
SET(LinearMath_SRCS
btConvexHull.cpp
btQuickprof.cpp
btGeometryUtil.cpp
btAlignedAllocator.cpp
)
SET(LibLinearMath_HDRS
SET(LinearMath_HDRS
btAlignedObjectArray.h
btList.h
btPoolAllocator.h
@@ -35,17 +35,15 @@ SET(LibLinearMath_HDRS
btTransformUtil.h
)
# ADD_LIBRARY(LibLinearMath SHARED ${LibLinearMath_SRCS} ${LibLinearMath_HDRS})
ADD_LIBRARY(LibLinearMath ${LibLinearMath_SRCS} ${LibLinearMath_HDRS})
ADD_LIBRARY(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS})
#FILES_MATCHING requires CMake 2.6
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.6)
INSTALL(TARGETS LibLinearMath DESTINATION lib)
INSTALL(TARGETS LinearMath DESTINATION lib)
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.6)
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
SET_TARGET_PROPERTIES(LibLinearMath PROPERTIES FRAMEWORK true)
SET_TARGET_PROPERTIES(LibLinearMath PROPERTIES PUBLIC_HEADER "${LibLinearMath_HDRS}")
SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true)
SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}")
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)