File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Android")
100100 file (MAKE_DIRECTORY ${ANDROID_PACKAGE_OUTPUT_DIR} )
101101endif ()
102102
103- # Set platform and ach for packaging
103+ # Set platform and arch for packaging
104+ # Checks the names set by MLAS on non-Windows platforms first
104105if (CMAKE_SYSTEM_NAME STREQUAL "Android" )
105106 set (JNI_ARCH ${ANDROID_ABI} )
106107elseif (ARM64)
@@ -110,7 +111,17 @@ elseif (X86_64)
110111elseif (POWER)
111112 set (JNI_ARCH ppc64)
112113else ()
113- message (FATAL_ERROR "Java is currently not supported for x86 architecture" )
114+ # Now mirror the checks used with MSVC
115+ if (MSVC )
116+ if (onnxruntime_target_platform STREQUAL "ARM64" )
117+ set (JNI_ARCH aarch64)
118+ elseif (onnxruntime_target_platform STREQUAL "x64" )
119+ set (JNI_ARCH x64)
120+ endif ()
121+ else ()
122+ # if everything else failed then we're on a 32-bit arch and Java isn't supported
123+ message (FATAL_ERROR "Java is currently not supported on 32-bit x86 architecture" )
124+ endif ()
114125endif ()
115126
116127if (WIN32 )
You can’t perform that action at this time.
0 commit comments