[bullet3] Add usage (#10226)

This commit is contained in:
Phoebe 2020-02-29 13:30:50 +08:00 committed by GitHub
parent 2121698e7b
commit df31c41168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 8 deletions

View File

@ -1,5 +1,5 @@
Source: bullet3
Version: 2.89
Version: 2.89-1
Homepage: https://github.com/bulletphysics/bullet3
Description: Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library

View File

@ -11,10 +11,9 @@ vcpkg_from_github(
PATCHES cmake-fix.patch
)
set(BULLET_MULTITHREADING OFF)
if ("multithreading" IN_LIST FEATURES)
set(BULLET_MULTITHREADING ON)
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
multithreading BULLET2_MULTITHREADING
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@ -28,7 +27,7 @@ vcpkg_configure_cmake(
-DBUILD_EXTRAS=OFF
-DBUILD_UNIT_TESTS=OFF
-DINSTALL_LIBS=ON
-DBULLET2_MULTITHREADING=${BULLET_MULTITHREADING}
${FEATURE_OPTIONS}
)
vcpkg_install_cmake()
@ -42,5 +41,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3 RENAME copyright)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

4
ports/bullet3/usage Normal file
View File

@ -0,0 +1,4 @@
The package bullet3 provides CMake targets:
find_package(Bullet CONFIG REQUIRED)
target_link_libraries(main PRIVATE LinearMath Bullet3Common BulletDynamics BulletSoftBody)