File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.12 )
22
33set (CMAKE_CXX_STANDARD 17)
44set (CMAKE_CXX_STANDARD_REQUIRED 1)
@@ -32,13 +32,20 @@ if("${OS_NAME}" STREQUAL "linux")
3232 set (Rust_CARGO_TARGET "x86_64-unknown-linux-gnu" )
3333 endif ()
3434 endif ()
35- elseif ("${OS_NAME} " STREQUAL "osx" )
35+ elseif ("${OS_NAME} " STREQUAL "osx" OR APPLE )
3636 if ("${OSX_BUILD_ARCH} " STREQUAL "arm64" )
3737 set (Rust_CARGO_TARGET "aarch64-apple-darwin" )
3838 elseif ("${OSX_BUILD_ARCH} " STREQUAL "x86_64" )
3939 set (Rust_CARGO_TARGET "x86_64-apple-darwin" )
4040 elseif ("${OS_ARCH} " STREQUAL "arm64" )
4141 set (Rust_CARGO_TARGET "aarch64-apple-darwin" )
42+ elseif ("${OS_ARCH} " STREQUAL "amd64" )
43+ set (Rust_CARGO_TARGET "x86_64-apple-darwin" )
44+ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" )
45+ set (Rust_CARGO_TARGET "aarch64-apple-darwin" )
46+ else ()
47+ # Default to x86_64 for macOS
48+ set (Rust_CARGO_TARGET "x86_64-apple-darwin" )
4249 endif ()
4350elseif (WIN32 )
4451 if (MINGW AND "${OS_ARCH} " STREQUAL "arm64" )
You can’t perform that action at this time.
0 commit comments