瀏覽代碼

JoltPhysics: Add missing public defines (#2040)

* JoltPhysics: Add missing public defines

As seen here https://github.com/jrouwe/JoltPhysics/blob/master/Jolt/Jolt.cmake#L464-L475

JPH_PROFILE_ENABLED and JPH_FLOATING_POINT_EXCEPTIONS_ENABLED are public define that were missing

* JoltPhysics: Fix fedora
Jérôme Leclercq 2 年之前
父節點
當前提交
f72c7ded6d
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      packages/j/joltphysics/xmake.lua

+ 8 - 0
packages/j/joltphysics/xmake.lua

@@ -8,6 +8,10 @@ package("joltphysics")
     add_versions("v3.0.1", "7ebb40bf2dddbcf0515984582aaa197ddd06e97581fd55b98cb64f91b243b8a6")
     add_versions("v3.0.1", "7ebb40bf2dddbcf0515984582aaa197ddd06e97581fd55b98cb64f91b243b8a6")
     add_versions("v3.0.0", "f8d756ae3471a32f2ee7e07475df2f7a34752f0fdd05e9a7ed2e7ce3dcdcd574")
     add_versions("v3.0.0", "f8d756ae3471a32f2ee7e07475df2f7a34752f0fdd05e9a7ed2e7ce3dcdcd574")
     add_versions("v2.0.1", "96ae2e8691c4802e56bf2587da30f2cc86b8abe82a78bc2398065bd87dd718af")
     add_versions("v2.0.1", "96ae2e8691c4802e56bf2587da30f2cc86b8abe82a78bc2398065bd87dd718af")
+    -- patch for missing standard include (fixes Fedora compilation)
+    add_patches("v3.0.1", "https://github.com/jrouwe/JoltPhysics/commit/2b418d38a36327e29f156b3c640e83f8c6caf067.patch", "4039ab991e4e847ec94517ce3bf459d6ee67f291116006d1bf9228f26f1dc86e")
+    add_patches("v3.0.0", "https://github.com/jrouwe/JoltPhysics/commit/2b418d38a36327e29f156b3c640e83f8c6caf067.patch", "4039ab991e4e847ec94517ce3bf459d6ee67f291116006d1bf9228f26f1dc86e")
+    add_patches("v2.0.1", "https://github.com/jrouwe/JoltPhysics/commit/2b418d38a36327e29f156b3c640e83f8c6caf067.patch", "4039ab991e4e847ec94517ce3bf459d6ee67f291116006d1bf9228f26f1dc86e")
     -- patches for Android/ARMv7 and VS2019 ARM64 support
     -- patches for Android/ARMv7 and VS2019 ARM64 support
     add_patches("v2.0.1", "https://github.com/jrouwe/JoltPhysics/commit/27b2c3293ea6bde6e3d6168b11d41c337f1a0913.patch", "43b3d38ea5a01c281ad7b580859acaf0b30eac9a7bdc271a54199fcc88b8d491")
     add_patches("v2.0.1", "https://github.com/jrouwe/JoltPhysics/commit/27b2c3293ea6bde6e3d6168b11d41c337f1a0913.patch", "43b3d38ea5a01c281ad7b580859acaf0b30eac9a7bdc271a54199fcc88b8d491")
     add_patches("v2.0.1", "https://github.com/jrouwe/JoltPhysics/commit/86a8f27aba3968713196635d8ab5234c96b73dc9.patch", "f6d368787ae7259dfbece7e8f1c1ba6af4d39f0f7c09a0f15186882bd827ed15")
     add_patches("v2.0.1", "https://github.com/jrouwe/JoltPhysics/commit/86a8f27aba3968713196635d8ab5234c96b73dc9.patch", "f6d368787ae7259dfbece7e8f1c1ba6af4d39f0f7c09a0f15186882bd827ed15")
@@ -47,6 +51,10 @@ package("joltphysics")
         if package:is_plat("windows") and not package:config("shared") then
         if package:is_plat("windows") and not package:config("shared") then
             package:add("syslinks", "Advapi32")
             package:add("syslinks", "Advapi32")
         end
         end
+        package:add("defines", "JPH_PROFILE_ENABLED")
+        if package:is_plat("windows") then
+            package:add("defines", "JPH_FLOATING_POINT_EXCEPTIONS_ENABLED")
+        end
         if package:config("cross_platform_deterministic") then
         if package:config("cross_platform_deterministic") then
             package:add("defines", "JPH_CROSS_PLATFORM_DETERMINISTIC")
             package:add("defines", "JPH_CROSS_PLATFORM_DETERMINISTIC")
         end
         end