FindBullet¶
Finds the Bullet physics engine:
find_package(Bullet [...])
Result Variables¶
This module defines the following variables:
Bullet_FOUND
Добавлено в версии 3.3.
Boolean indicating whether Bullet was found.
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.
Deprecated Variables¶
The following variables are provided for backward compatibility:
BULLET_FOUND
Устарело, начиная с версии 4.2: Use
Bullet_FOUND
, which has the same value.Boolean indicating whether Bullet was found.
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)