Skip to content

Commit d098c2d

Browse files
authored
Merge pull request #617 from CesiumGS/update-native-proper
Fix Mac build failure from `cpp-httplib` update
2 parents e71a6a0 + 5b611bd commit d098c2d

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
reporter: dotnet-nunit
165165
MacOS:
166166
needs: [QuickChecks]
167-
runs-on: macos-latest
167+
runs-on: macos-14
168168
# Only allow a single macOS build at a time, for Unity licensing reasons
169169
concurrency: mac
170170
steps:
@@ -192,6 +192,13 @@ jobs:
192192
sudo rm -rf /Applications/Xcode_16_beta_6.app
193193
ls /Applications
194194
df -h
195+
- name: Set XCode version
196+
uses: maxim-lobanov/setup-xcode@v1
197+
with:
198+
xcode-version: "15.4"
199+
- name: Print XCode version
200+
run: |
201+
xcode-select --print-path
195202
- name: Check out repository code
196203
uses: actions/checkout@v4
197204
with:

native~/Editor/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ target_link_libraries(
3838
enum-flags
3939
)
4040

41+
# cpp-httplib, as of v0.26.0, seems to be missing a required dependency on CoreServices on macOS, so add it here.
42+
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
43+
target_link_libraries(
44+
CesiumForUnityNative-Editor
45+
PRIVATE
46+
"-framework CoreServices"
47+
)
48+
endif()
49+
4150
set_target_properties(
4251
CesiumForUnityNative-Editor
4352
PROPERTIES

native~/Runtime/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ target_link_libraries(
4747
swl-variant
4848
)
4949

50+
# cpp-httplib, as of v0.26.0, seems to be missing a required dependency on CoreServices on macOS, so add it here.
51+
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
52+
target_link_libraries(
53+
CesiumForUnityNative-Runtime
54+
PRIVATE
55+
"-framework CoreServices"
56+
)
57+
endif()
58+
5059
set_target_properties(
5160
CesiumForUnityNative-Runtime
5261
PROPERTIES

0 commit comments

Comments
 (0)