From a6e1a22dc036a5e739dc286f95af0567bd2d61a9 Mon Sep 17 00:00:00 2001 From: dskuza Date: Thu, 5 Dec 2024 23:31:59 +0000 Subject: [PATCH] Add yoga renames to non-v2 lua build scripts This pull request addresses the following GitHub issues and more: - [rive-ios #345](https://github.com/rive-app/rive-ios/issues/345) - [rive-react-native #268](https://github.com/rive-app/rive-react-native/issues/268) Thanks to some help from @luigi-rosso, we discovered that the iOS runtime build scripts were _not_ including the Yoga renames, causing a collision when some frameworks were statically linked in React Native environments. This has been tested locally, and works, but the real test will be the public. Diffs= 437688c18e Add yoga renames to non-v2 lua build scripts (#8693) Co-authored-by: David Skuza --- .rive_head | 2 +- build/premake5.lua | 5 +++++ dependencies/premake5_yoga.lua | 3 +++ dependencies/rive_yoga_renames.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.rive_head b/.rive_head index 1e1fb1ba..1f064791 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -423301a95b5312d1d13dc6f394acc36a7b7a8607 +437688c18e858a3d5fba529802d77c1cb523c841 diff --git a/build/premake5.lua b/build/premake5.lua index 62d4627e..df0fbe2e 100644 --- a/build/premake5.lua +++ b/build/premake5.lua @@ -52,6 +52,11 @@ do defines({ 'YOGA_EXPORT=', '_RIVE_INTERNAL_' }) + includedirs({ + '../dependencies/', + }) + forceincludes({ 'rive_yoga_renames.h' }) + files({ '../src/**.cpp' }) flags({ 'FatalCompileWarnings' }) diff --git a/dependencies/premake5_yoga.lua b/dependencies/premake5_yoga.lua index 93f0eea8..11306b24 100644 --- a/dependencies/premake5_yoga.lua +++ b/dependencies/premake5_yoga.lua @@ -31,6 +31,9 @@ do yoga .. '/yoga/log.cpp', }) + includedirs({ './' }) + forceincludes({ 'rive_yoga_renames.h' }) + buildoptions({ '-Wall', '-pedantic' }) linkoptions({ '-r' }) diff --git a/dependencies/rive_yoga_renames.h b/dependencies/rive_yoga_renames.h index f10efae0..675fd7ae 100644 --- a/dependencies/rive_yoga_renames.h +++ b/dependencies/rive_yoga_renames.h @@ -239,3 +239,4 @@ #define YGNodeStyleSetWidthPercent rive_YGNodeStyleSetWidthPercent #define YGNodeSwapChild rive_YGNodeSwapChild #define YGRoundValueToPixelGrid rive_YGRoundValueToPixelGrid +#define facebook rive_facebook