support Apple silicon
parent
3a1d23b5bb
commit
b1bce79e95
|
@ -105,7 +105,12 @@ function(wrap_library_internal interfaceHeader moduleName linkLibraries extraInc
|
||||||
set(mexModuleExt mexglx)
|
set(mexModuleExt mexglx)
|
||||||
endif()
|
endif()
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
set(mexModuleExt mexmaci64)
|
check_cxx_compiler_flag("-arch arm64" arm64Supported)
|
||||||
|
if (arm64Supported)
|
||||||
|
set(mexModuleExt mexmaca64)
|
||||||
|
else()
|
||||||
|
set(mexModuleExt mexmaci64)
|
||||||
|
endif()
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
if(CMAKE_CL_64)
|
if(CMAKE_CL_64)
|
||||||
set(mexModuleExt mexw64)
|
set(mexModuleExt mexw64)
|
||||||
|
@ -299,7 +304,12 @@ function(wrap_library_internal interfaceHeader moduleName linkLibraries extraInc
|
||||||
APPEND
|
APPEND
|
||||||
PROPERTY COMPILE_FLAGS "/bigobj")
|
PROPERTY COMPILE_FLAGS "/bigobj")
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
set(mxLibPath "${MATLAB_ROOT}/bin/maci64")
|
check_cxx_compiler_flag("-arch arm64" arm64Supported)
|
||||||
|
if (arm64Supported)
|
||||||
|
set(mxLibPath "${MATLAB_ROOT}/bin/maca64")
|
||||||
|
else()
|
||||||
|
set(mxLibPath "${MATLAB_ROOT}/bin/maci64")
|
||||||
|
endif()
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${moduleName}_matlab_wrapper "${mxLibPath}/libmex.dylib"
|
${moduleName}_matlab_wrapper "${mxLibPath}/libmex.dylib"
|
||||||
"${mxLibPath}/libmx.dylib" "${mxLibPath}/libmat.dylib")
|
"${mxLibPath}/libmx.dylib" "${mxLibPath}/libmat.dylib")
|
||||||
|
@ -367,7 +377,12 @@ function(check_conflicting_libraries_internal libraries)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
# Set path for matlab's built-in libraries
|
# Set path for matlab's built-in libraries
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(mxLibPath "${MATLAB_ROOT}/bin/maci64")
|
check_cxx_compiler_flag("-arch arm64" arm64Supported)
|
||||||
|
if (arm64Supported)
|
||||||
|
set(mxLibPath "${MATLAB_ROOT}/bin/maca64")
|
||||||
|
else()
|
||||||
|
set(mxLibPath "${MATLAB_ROOT}/bin/maci64")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
if(CMAKE_CL_64)
|
if(CMAKE_CL_64)
|
||||||
set(mxLibPath "${MATLAB_ROOT}/bin/glnxa64")
|
set(mxLibPath "${MATLAB_ROOT}/bin/glnxa64")
|
||||||
|
|
Loading…
Reference in New Issue