Skip to content

Commit

Permalink
MacCatalyst is more like iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 committed Sep 25, 2024
1 parent e9e2c25 commit 22dd752
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ target_link_directories(onnxruntime-genai PRIVATE ${ORT_LIB_DIR})

# we keep the shared libraries disconnected on Android as they will come from separate AARs and we don't want to force
# the ORT version to match in both.
if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (NOT BUILD_APPLE_FRAMEWORK)))
if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (NOT BUILD_APPLE_FRAMEWORK) AND (NOT MAC_CATALYST)))
add_compile_definitions(_ORT_GENAI_USE_DLOPEN)
else()
target_link_libraries(onnxruntime-genai PRIVATE ${ONNXRUNTIME_LIB})
Expand Down
4 changes: 1 addition & 3 deletions cmake/ortlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ else()
else()
set(ORT_BINARY_PLATFORM "x64")
if (APPLE)
if(IOS)
set(ORT_BINARY_PLATFORM ${IOS_ARCH})
elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(ORT_BINARY_PLATFORM "arm64")
endif()
set(ORT_LIB_DIR ${ortlib_SOURCE_DIR}/runtimes/osx-${ORT_BINARY_PLATFORM}/native)
Expand Down

0 comments on commit 22dd752

Please sign in to comment.