Skip to content

Commit

Permalink
Add Yoga as a submodule and a Makefile for building it for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
gilzoide committed Nov 24, 2023
1 parent 1b02e7b commit c511cf9
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ insert_final_newline = true

[*.{asmdef,cs}]
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 8
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Plugins/yoga~"]
path = Plugins/yoga~
url = https://github.com/facebook/yoga.git
8 changes: 8 additions & 0 deletions Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Plugins/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CMAKE_BIN ?= cmake

# macOS
yoga~/build/macos:
$(CMAKE_BIN) yoga~/yoga -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -B $@ -G "Unix Makefiles"
yoga~/build/macos/libyogacore.a: | yoga~/build/macos
$(MAKE) -C $|

flex-ui.dylib: CXXFLAGS += -arch x86_64 -arch arm64
flex-ui.dylib: LINKFLAGS += -shared -Wl,-all_load
flex-ui.dylib: yoga~/build/macos/libyogacore.a
$(CXX) -o $@ $< $(CXXFLAGS) $(LINKFLAGS)
7 changes: 7 additions & 0 deletions Plugins/Makefile.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Plugins/yoga~
Submodule yoga~ added at a822f2

0 comments on commit c511cf9

Please sign in to comment.