File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -29,19 +29,24 @@ set(ABSL_PROPAGATE_CXX_STD ON)
2929# include abseil
3030set (ABSL_MSVC_STATIC_RUNTIME ON )
3131add_subdirectory (third_party/abseil-cpp EXCLUDE_FROM_ALL )
32- IF (APPLE )
33- set (CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "Build architectures for Mac OS X" FORCE)
34- ENDIF (APPLE )
3532
3633
3734# include protobuf
3835SET (protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support" )
3936SET (protobuf_BUILD_TESTS OFF CACHE BOOL "Build tests off" )
4037set (protobuf_INSTALL OFF CACHE BOOL "Install protobuf off" FORCE)
4138add_subdirectory (third_party/protobuf EXCLUDE_FROM_ALL )
42- IF (APPLE )
43- set_target_properties (protoc libprotoc libprotobuf PROPERTIES OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "Build architectures for Mac OS X" FORCE )
44- ENDIF (APPLE )
39+ if (APPLE )
40+ execute_process (
41+ COMMAND uname -m
42+ OUTPUT_VARIABLE HOST_ARCH
43+ OUTPUT_STRIP_TRAILING_WHITESPACE
44+ )
45+ set_target_properties (protoc libprotoc libprotobuf
46+ PROPERTIES
47+ OSX_ARCHITECTURES "${HOST_ARCH} "
48+ )
49+ endif ()
4550
4651IF (WIN32 )
4752 add_compile_definitions (WIN32_LEAN_AND_MEAN NOGDI)
You can’t perform that action at this time.
0 commit comments