Skip to content

Commit

Permalink
Add yoga renames to non-v2 lua build scripts
Browse files Browse the repository at this point in the history
This pull request addresses the following GitHub issues and more:
- [rive-ios #345](rive-app/rive-ios#345)
- [rive-react-native #268](rive-app/rive-react-native#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 <[email protected]>
  • Loading branch information
dskuza and dskuza committed Dec 5, 2024
1 parent d771676 commit a6e1a22
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
423301a95b5312d1d13dc6f394acc36a7b7a8607
437688c18e858a3d5fba529802d77c1cb523c841
5 changes: 5 additions & 0 deletions build/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ do

defines({ 'YOGA_EXPORT=', '_RIVE_INTERNAL_' })

includedirs({
'../dependencies/',
})
forceincludes({ 'rive_yoga_renames.h' })

files({ '../src/**.cpp' })

flags({ 'FatalCompileWarnings' })
Expand Down
3 changes: 3 additions & 0 deletions dependencies/premake5_yoga.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ do
yoga .. '/yoga/log.cpp',
})

includedirs({ './' })
forceincludes({ 'rive_yoga_renames.h' })

buildoptions({ '-Wall', '-pedantic' })

linkoptions({ '-r' })
Expand Down
1 change: 1 addition & 0 deletions dependencies/rive_yoga_renames.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,4 @@
#define YGNodeStyleSetWidthPercent rive_YGNodeStyleSetWidthPercent
#define YGNodeSwapChild rive_YGNodeSwapChild
#define YGRoundValueToPixelGrid rive_YGRoundValueToPixelGrid
#define facebook rive_facebook

0 comments on commit a6e1a22

Please sign in to comment.