2016-10-06 03:49:46 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-12-24 01:07:20 +08:00
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2017-12-24 01:07:20 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO bulletphysics/bullet3
|
2019-05-22 12:00:24 +08:00
|
|
|
REF 2.88
|
|
|
|
SHA512 15face1940d496c96fd19a44139d11d2cbb629526c40432be4a0eef5fa9a532c842ec7318248c0359a080f2034111bf1a3c2d3a6fd789bec675bd368fac7bd93
|
2017-12-24 01:07:20 +08:00
|
|
|
HEAD_REF master
|
2020-01-07 06:44:15 +08:00
|
|
|
PATCHES cmake-fix.patch
|
2016-10-06 03:49:46 +08:00
|
|
|
)
|
|
|
|
|
2019-07-31 07:10:59 +08:00
|
|
|
set(BULLET_MULTITHREADING OFF)
|
|
|
|
if ("multithreading" IN_LIST FEATURES)
|
|
|
|
set(BULLET_MULTITHREADING ON)
|
|
|
|
endif()
|
|
|
|
|
2016-10-06 03:49:46 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2019-08-01 04:01:02 +08:00
|
|
|
PREFER_NINJA
|
2016-10-08 03:35:24 +08:00
|
|
|
OPTIONS
|
2016-10-21 04:25:10 +08:00
|
|
|
-DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON
|
|
|
|
-DBUILD_DEMOS=OFF
|
|
|
|
-DBUILD_CPU_DEMOS=OFF
|
|
|
|
-DBUILD_BULLET2_DEMOS=OFF
|
|
|
|
-DBUILD_BULLET3=OFF
|
|
|
|
-DBUILD_EXTRAS=OFF
|
|
|
|
-DBUILD_UNIT_TESTS=OFF
|
|
|
|
-DINSTALL_LIBS=ON
|
2019-07-31 07:10:59 +08:00
|
|
|
-DBULLET2_MULTITHREADING=${BULLET_MULTITHREADING}
|
2016-10-06 03:49:46 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2020-01-07 06:44:15 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "share/bullet3")
|
|
|
|
|
|
|
|
# Clean up unneeded files
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2016-10-06 03:49:46 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-12-24 01:07:20 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics/details)
|
2016-10-06 03:49:46 +08:00
|
|
|
|
2017-03-10 01:40:03 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-12-24 01:07:20 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2019-05-03 13:57:43 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3 RENAME copyright)
|