vcpkg/ports/bullet3/portfile.cmake

46 lines
1.4 KiB
CMake
Raw Normal View History

2020-01-14 03:30:54 +08:00
vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP")
2017-12-24 01:07:20 +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
2020-01-14 03:30:54 +08:00
REF 2.89
SHA512 3c4ba6a3b3623ef44dd4a23e0bc2e90dec1f2b7af463edcb886e110feac1dfb4a91945f0ed640052cac228318539e275976d37238102fb10a0f78aef065a730b
2017-12-24 01:07:20 +08:00
HEAD_REF master
PATCHES cmake-fix.patch
2016-10-06 03:49:46 +08:00
)
2020-02-29 13:30:50 +08:00
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
multithreading BULLET2_MULTITHREADING
)
2016-10-06 03:49:46 +08:00
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-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
2020-02-29 13:30:50 +08:00
${FEATURE_OPTIONS}
2016-10-06 03:49:46 +08:00
)
vcpkg_install_cmake()
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
2020-02-29 13:30:50 +08:00
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)