Files
rive-cpp/dependencies/premake5_yoga_v2.lua
philter 52f8ed2236 Improve handling of Yoga exceptions in editor (#10438) b39218b476
Prevent Yoga related crashes in editor and expose whether a Yoga node is in an error state so we can provide a warning to the user.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-23 18:07:24 +00:00

48 lines
1.2 KiB
Lua

dofile('rive_build_config.lua')
local dependency = require('dependency')
yoga = dependency.github('rive-app/yoga', 'rive_changes_v2_0_1_2')
newoption({
trigger = 'no-yoga-renames',
description = 'don\'t rename yoga symbols',
})
project('rive_yoga')
do
kind('StaticLib')
warnings('Off')
defines({ 'YOGA_EXPORT=' })
includedirs({ yoga })
filter('action:xcode4')
do
-- xcode doesnt like angle brackets except for -isystem
-- should use externalincludedirs but GitHub runners dont have latest premake5 binaries
buildoptions({ '-isystem' .. yoga })
end
filter({})
files({
yoga .. '/yoga/Utils.cpp',
yoga .. '/yoga/YGConfig.cpp',
yoga .. '/yoga/YGLayout.cpp',
yoga .. '/yoga/YGEnums.cpp',
yoga .. '/yoga/YGNodePrint.cpp',
yoga .. '/yoga/YGNode.cpp',
yoga .. '/yoga/YGValue.cpp',
yoga .. '/yoga/YGStyle.cpp',
yoga .. '/yoga/Yoga.cpp',
yoga .. '/yoga/event/event.cpp',
yoga .. '/yoga/log.cpp',
})
filter({ 'options:not no-yoga-renames' })
do
includedirs({ './' })
forceincludes({ 'rive_yoga_renames.h' })
end
end