added bullet.pc.cmake and fixes for PKGCONFIG

See also http://code.google.com/p/bullet/issues/detail?id=337
This commit is contained in:
erwin.coumans 2010-03-31 20:58:53 +00:00
parent 0bf3cb5aa5
commit c0a694c571
2 changed files with 21 additions and 1 deletions

View File

@ -212,7 +212,21 @@ ELSE()
ENDIF()
ENDIF()
IF(INSTALL_LIBS)
SET (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
SET (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name")
## the following are directories where stuff will be installed to
SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/bullet/" CACHE PATH "The subdirectory to the header prefix")
SET(PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files")
IF(NOT WIN32)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bullet.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/bullet.pc @ONLY)
INSTALL(
FILES
${CMAKE_CURRENT_BINARY_DIR}/bullet.pc
DESTINATION
${PKGCONFIG_INSTALL_PREFIX})
ENDIF(NOT WIN32)
ENDIF(INSTALL_LIBS)
#INSTALL of other files requires CMake 2.6
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)

6
bullet.pc.cmake Normal file
View File

@ -0,0 +1,6 @@
Name: bullet
Description: Bullet Continuous Collision Detection and Physics Library
Requires:
Version: @BULLET_VERSION@
Libs: -L@LIB_DESTINATION@ -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath
Cflags: -I@INCLUDE_INSTALL_DIR@/bullet