Skip to content

Commit

Permalink
update for iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
alexchicn committed Oct 14, 2020
1 parent 738b4f3 commit 5f186be
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/buildwithdraco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
cmake -DLIBGLTF_USE_GOOGLE_DRACO=TRUE -DLIBGLTF_USE_GOOGLE_DRACO_SUBMODULE=TRUE ../
make libgltf
cd ..
- name: 'ready artifact'
run: |
cp -ar build/draco/ output/include/draco/
cp -a build/external/draco/dracodec.a output/lib/linux/dracodec.a
- name: 'upload artifact'
uses: actions/upload-artifact@v1.0.0
with:
Expand All @@ -52,6 +56,10 @@ jobs:
cmake -DLIBGLTF_USE_GOOGLE_DRACO=TRUE -DLIBGLTF_USE_GOOGLE_DRACO_SUBMODULE=TRUE ../
make libgltf
cd ..
- name: 'ready artifact'
run: |
cp -ar build/draco/ output/include/draco/
cp -a build/external/draco/dracodec.a output/lib/linux/dracodec.a
- name: 'upload artifact'
uses: actions/upload-artifact@v1.0.0
with:
Expand Down Expand Up @@ -84,6 +92,12 @@ jobs:
make libgltf
cd ..
cd ..
- name: 'ready artifact'
run: |
cp -ar build/draco/ output/include/draco/
cp -a build/external/draco/dracodec.a output/lib/ios_OS/dracodec.a
cp -a build/external/draco/dracodec.a output/lib/ios_WATCHOS/dracodec.a
cp -a build/external/draco/dracodec.a output/lib/ios_SIMULATOR/dracodec.a
- name: 'upload artifact'
uses: actions/upload-artifact@v1.0.0
with:
Expand All @@ -110,17 +124,18 @@ jobs:
msbuild libgltf.sln /t:Build /p:Configuration="Release" /p:Platform="x64"
cd ../
cd ../
- name: 'ready artifact'
run: |
xcopy build\draco\ output\include\draco\ /E/H/C/I
xcopy build\external\draco\Debug\ lib\win64\Debug\ /E/H/C/I
xcopy build\external\draco\Release\ lib\win64\Release\ /E/H/C/I
- name: 'upload artifact'
uses: actions/upload-artifact@v1.0.0
with:
name: libgltf.windows
path: |
output/
build/draco/ => include/draco/
build/external/draco/Debug/ => lib/win64/Debug/
build/external/draco/Release/ => lib/win64/Release/
path: output/
win32:
name: 'for windows'
name: 'for windows win32'
runs-on: windows-latest
steps:
- name: 'checkout the project'
Expand All @@ -140,12 +155,13 @@ jobs:
msbuild libgltf.sln /t:Build /p:Configuration="Release" /p:Platform="Win32"
cd ../
cd ../
- name: 'ready artifact'
run: |
xcopy build\draco\ output\include\draco\ /E/H/C/I
xcopy build\external\draco\Debug\ output\lib\win32\Debug\ /E/H/C/I
xcopy build\external\draco\Release\ output\lib\win32\Release\ /E/H/C/I
- name: 'upload artifact'
uses: actions/upload-artifact@v1.0.0
with:
name: libgltf.windows
path: |
output/
build/draco/ => include/draco/
build/external/draco/Debug/ => lib/win32/Debug/
build/external/draco/Release/ => lib/win32/Release/
path: output/
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(LIBGLTF_PLATFORM_WINDOWS FALSE)
set(LIBGLTF_PLATFORM_LINUX FALSE)
set(LIBGLTF_PLATFORM_MACOS FALSE)
set(LIBGLTF_PLATFORM_ANDROID FALSE)
set(LIBGLTF_PLATFORM_IOS FALSE)
set(LIBGLTF_PLATFORM_IOS FALSE CACHE BOOL "Build for iOS?")

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(LIBGLTF_PLATFORM_WINDOWS TRUE)
Expand Down Expand Up @@ -69,7 +69,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND ${LIBGLTF_PLATFORM_IOS})
add_definitions(-DLIBGLTF_PLATFORM_IOS)
set(DYNAMIC_LIBRARY_EXTENSION ".dylib")
set(STATIC_LIBRARY_EXTENSION ".a")
set(PLATFORM_NAME "ios")
set(PLATFORM_NAME "ios_${IOS_PLATFORM}")
set(CMAKE_C_FLAGS "-Wall -Wextra -Wshadow -Wconversion -Wno-long-long -pedantic ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wno-long-long -pedantic ${CMAKE_CXX_FLAGS}")
set(CMAKE_STATIC_LIBRARY_PREFIX "")
Expand Down

0 comments on commit 5f186be

Please sign in to comment.