overte/cmake/ports/bullet3/portfile.cmake
Anthony J. Thibault 154fd393ba Bug fix for crash in QScriptEngine::reportAdditionalMemoryCost()
This fix requires a patch to qt.  This build includs a new pre-built Qt 5.12.3 with the patch applied.
See tools/qt5-builder/qtscript-crash-fix.patch to see actual patch applied.

* Touched bullet3 portfile to create new vckpg hash
* New urls for qt assets which include qscript patch hifi_vcpkg.py
* Updated tools/qt5-builder/ with qscript patch and README.md directions.

https://highfidelity.atlassian.net/browse/BUGZ-46

A qt bug was filed to hopefully get this bug fixed upstream.
https://bugreports.qt.io/browse/QTBUG-76176
2019-06-03 17:11:54 -07:00

60 lines
No EOL
2.1 KiB
CMake

# Updated June 6th, 2019, to force new vckpg hash
#
# Common Ambient Variables:
#
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
include(vcpkg_common_functions)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(WARNING "Dynamic not supported, building static")
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CRT_LINKAGE dynamic)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO bulletphysics/bullet3
REF ab8f16961e19a86ee20c6a1d61f662392524cc77
SHA512 927742db29867517283d45e475f0c534a9a57e165cae221f26e08e88057253a1682ac9919b2dc547b9cf388ba0b931b175623461d44f28c9184796ba90b1ed55
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
-DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON
-DUSE_GLUT=0
-DUSE_DX11=0
-DBUILD_DEMOS=OFF
-DBUILD_OPENGL3_DEMOS=OFF
-DBUILD_BULLET3=OFF
-DBUILD_BULLET2_DEMOS=OFF
-DBUILD_CPU_DEMOS=OFF
-DBUILD_EXTRAS=OFF
-DBUILD_UNIT_TESTS=OFF
-DBUILD_SHARED_LIBS=ON
-DINSTALL_LIBS=ON
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics/details)
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3 RENAME copyright)