FindBullet¶
Finds the Bullet physics engine:
find_package(Bullet [...])
Result Variables¶
This module defines the following variables:
Bullet_FOUND
Boolean indicating whether Bullet was found. For backward compatibility, the
BULLET_FOUND
variable is also set to the same value.BULLET_INCLUDE_DIRS
The Bullet include directories.
BULLET_LIBRARIES
Libraries needed to link to Bullet. By default, all Bullet components (Dynamics, Collision, LinearMath, and SoftBody) are added.
Hints¶
This module accepts the following variables:
BULLET_ROOT
Can be set to Bullet install path or Windows build path to specify where to find Bullet.
Examples¶
Finding Bullet and conditionally creating an interface imported target that encapsulates its usage requirements for linking to a project target:
find_package(Bullet)
if(Bullet_FOUND AND NOT TARGET Bullet::Bullet)
add_library(Bullet::Bullet INTERFACE IMPORTED)
set_target_properties(
Bullet::Bullet
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${BULLET_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${BULLET_LIBRARIES}"
)
endif()
target_link_libraries(example PRIVATE Bullet::Bullet)