2022-11-15 13:30:00 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO jrouwe/JoltPhysics
|
2023-02-01 03:26:52 +08:00
|
|
|
REF "v${VERSION}"
|
2024-04-06 08:20:31 +08:00
|
|
|
SHA512 802f6e1a50270c7348fd3740e0cd3f6e9c05d6f1ba52e1c2c890172897a33f34761165f6eabc4d6f36d6d5055017e9e9bd06b165239269634299f0674c0aaa26
|
2022-11-15 13:30:00 +08:00
|
|
|
HEAD_REF master
|
2023-09-27 16:20:50 +08:00
|
|
|
PATCHES
|
|
|
|
fix-export.diff
|
2022-11-15 13:30:00 +08:00
|
|
|
)
|
|
|
|
|
2023-09-27 16:20:50 +08:00
|
|
|
# Need to provide this library a config
|
|
|
|
# The fix-export.diff should install this
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-joltphysics-config.cmake" DESTINATION "${SOURCE_PATH}/Build")
|
|
|
|
|
2022-11-15 13:30:00 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_STATIC_CRT)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}/Build"
|
|
|
|
OPTIONS
|
|
|
|
-DTARGET_UNIT_TESTS=OFF
|
|
|
|
-DTARGET_HELLO_WORLD=OFF
|
|
|
|
-DTARGET_PERFORMANCE_TEST=OFF
|
|
|
|
-DTARGET_SAMPLES=OFF
|
|
|
|
-DTARGET_VIEWER=OFF
|
|
|
|
-DCROSS_PLATFORM_DETERMINISTIC=OFF
|
2023-09-27 16:20:50 +08:00
|
|
|
-DINTERPROCEDURAL_OPTIMIZATION=OFF
|
2022-11-15 13:30:00 +08:00
|
|
|
-DUSE_STATIC_MSVC_RUNTIME_LIBRARY=${USE_STATIC_CRT}
|
2023-04-19 07:22:33 +08:00
|
|
|
-DENABLE_ALL_WARNINGS=OFF
|
2024-04-09 23:37:23 +08:00
|
|
|
-DOVERRIDE_CXX_FLAGS=OFF
|
2022-11-15 13:30:00 +08:00
|
|
|
OPTIONS_RELEASE
|
2023-09-27 16:20:50 +08:00
|
|
|
-DGENERATE_DEBUG_SYMBOLS=OFF
|
2024-04-06 08:20:31 +08:00
|
|
|
-DDEBUG_RENDERER_IN_DEBUG_AND_RELEASE=OFF
|
|
|
|
-DPROFILER_IN_DEBUG_AND_RELEASE=OFF
|
2022-11-15 13:30:00 +08:00
|
|
|
)
|
|
|
|
|
2023-09-27 16:20:50 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2022-11-15 13:30:00 +08:00
|
|
|
|
2023-09-27 16:20:50 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/unofficial-${PORT} PACKAGE_NAME unofficial-${PORT})
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2022-11-15 13:30:00 +08:00
|
|
|
|
2022-11-30 03:54:18 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-02-01 03:26:52 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|