Skip to content

Commit c297643

Browse files
committed
Pack the darwin build based on the architecture
The current prebuilts put the darwin builds under "darwin/x86_64", so reproduce that behavior for the CMake packaging logic. PiperOrigin-RevId: 291844613
1 parent 71a7391 commit c297643

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/cpp_pack.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,14 @@ if(${FIREBASE_CPP_BUILD_PACKAGE})
4444
elseif(MSVC)
4545
set(FIREBASE_LIB_CONFIG_PATH "windows")
4646
elseif(APPLE)
47-
set(FIREBASE_LIB_CONFIG_PATH "darwin")
47+
# Use the provided architecture, or fallback to a reasonable default.
48+
if(${CMAKE_OSX_ARCHITECTURES} STREQUAL "")
49+
set(FIREBASE_LIB_CONFIG_PATH "darwin/x86_64")
50+
else()
51+
set(FIREBASE_LIB_CONFIG_PATH "darwin/${CMAKE_OSX_ARCHITECTURES}")
52+
endif()
4853
else()
4954
# Check if building for 32 bit
50-
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
5155
if("${CMAKE_CXX_FLAGS}" MATCHES "-m32")
5256
set(FIREBASE_LIB_CONFIG_PATH "linux/i386")
5357
else()

0 commit comments

Comments
 (0)