File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 3838 run : |
3939 yarn build
4040 mkdir -p ../dist/webgl
41- cp -a build/ ../dist/webgl/
42- cp -a binaries/ ../dist/webgl/
41+ cp build/libyogaObjLib.a ../dist/webgl/libyoga.a
4342
4443 - name : Upload Binaries
4544 uses : actions/upload-artifact@v3
6867 mkdir -p dist/osx
6968 cp build/libyogacore.dylib dist/osx/libyoga.dylib
7069
70+ - name : Build IOS
71+ run : |
72+ rm -rf build
73+ cmake -B build -S yoga -D CMAKE_BUILD_TYPE=Release -G Xcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_Swift_COMPILER_FORCED=true -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
74+ cmake --build build --config Release
75+ mkdir -p dist/iOS
76+ cp -a build/ dist/iOS/
77+
7178 - name : Upload Binaries
7279 uses : actions/upload-artifact@v3
7380 if : github.event_name == 'push'
Original file line number Diff line number Diff line change 33# This source code is licensed under the MIT license found in the
44# LICENSE file in the root directory of this source tree.
55
6+ option (BUILD_STATIC_LIBS "Build static library (.a) instead of object library" OFF )
7+
68cmake_minimum_required (VERSION 3.13...3.26)
79set (CMAKE_VERBOSE_MAKEFILE on )
810project (yoga)
@@ -51,7 +53,11 @@ add_link_options(
5153
5254link_libraries (embind)
5355
54- add_library (yogaObjLib STATIC ${SOURCES} )
56+ if (BUILD_STATIC_LIBS)
57+ add_library (yogaObjLib STATIC ${SOURCES} )
58+ else ()
59+ add_library (yogaObjLib OBJECT ${SOURCES} )
60+ endif ()
5561
5662set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /binaries)
5763
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ function emcmakeGenerateTask() {
197197 '-B' ,
198198 'build' ,
199199 ...( process . platform === 'win32' ? [ ] : [ '-G' , 'Ninja' ] ) ,
200+ '-D BUILD_STATIC_LIBS=ON' ,
200201 ] ;
201202 logger . info ( [ 'emcmake' , ...args ] . join ( ' ' ) ) ;
202203
You can’t perform that action at this time.
0 commit comments