File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,16 @@ foreach(LIBRARY ${LIBRARIES})
4848 list (APPEND OBJECT_FILES ${OBJ_FILES} )
4949endforeach ()
5050
51+ # Specify the target architecture.
52+
53+ if (APPLE )
54+ if ("${TARGET_ARCHITECTURE} " STREQUAL "Intel" )
55+ set (CMAKE_OSX_ARCHITECTURES x86_64)
56+ else ()
57+ set (CMAKE_OSX_ARCHITECTURES arm64)
58+ endif ()
59+ endif ()
60+
5161# Create a new static library for libOpenCOR.
5262
5363add_library (${CMAKE_PROJECT_NAME} STATIC
Original file line number Diff line number Diff line change @@ -433,6 +433,7 @@ if( NOT EMSCRIPTEN
433433 CMAKE_ARGS
434434 -DPREBUILT_DIR=${PREBUILT_DIR}
435435 -DLIBOPENCOR_STATIC_LIBRARY=$<TARGET_FILE :${CMAKE_PROJECT_NAME} >
436+ -DTARGET_ARCHITECTURE=${LIBOPENCOR_TARGET_ARCHITECTURE}
436437 INSTALL_COMMAND
437438 ""
438439 DEPENDS
You can’t perform that action at this time.
0 commit comments