Skip to content

Commit

Permalink
vcpkg release builds only, use Unity's Android NDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Aug 7, 2024
1 parent 77c4563 commit 3238e59
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ jobs:
mkdir -p d:\cesium\temp
# Store temp files on the D drive, which is much faster than the EBS-backed C drive.
$ENV:TEMP="d:\cesium\temp"
# We only need a release build of vcpkg dependencies
$ENV:CESIUM_VCPKG_RELEASE_ONLY="TRUE"
# Clear ANDROID_NDK_ROOT so that we use Unity's version
Remove-Item Env:ANDROID_NDK_ROOT
# Run the build
dotnet run --project Build~
cat D:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity\native~\build-Android-arm64\build.log
dir d:\cesium\CesiumForUnityBuildProject
Expand Down
2 changes: 2 additions & 0 deletions native~/vcpkg/triplets/arm64-android-unity.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include("${CMAKE_CURRENT_LIST_DIR}/shared/common.cmake")

set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
Expand Down
2 changes: 2 additions & 0 deletions native~/vcpkg/triplets/arm64-uwp-unity.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include("${CMAKE_CURRENT_LIST_DIR}/shared/common.cmake")

set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
Expand Down
5 changes: 5 additions & 0 deletions native~/vcpkg/triplets/shared/common.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
list(APPEND VCPKG_ENV_PASSTHROUGH "CESIUM_VCPKG_RELEASE_ONLY")

if(DEFINED ENV{CESIUM_VCPKG_RELEASE_ONLY} AND "$ENV{CESIUM_VCPKG_RELEASE_ONLY}")
set(VCPKG_BUILD_TYPE "release")
endif()
2 changes: 2 additions & 0 deletions native~/vcpkg/triplets/x64-android-unity.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include("${CMAKE_CURRENT_LIST_DIR}/shared/common.cmake")

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
Expand Down
2 changes: 2 additions & 0 deletions native~/vcpkg/triplets/x64-uwp-unity.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include("${CMAKE_CURRENT_LIST_DIR}/shared/common.cmake")

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
Expand Down
2 changes: 2 additions & 0 deletions native~/vcpkg/triplets/x64-windows-unity.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include("${CMAKE_CURRENT_LIST_DIR}/shared/common.cmake")

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)

0 comments on commit 3238e59

Please sign in to comment.