mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
build: enhance CMakeLists to dynamically detect kernel version to utilize (#4828)
This commit is contained in:
parent
a356832882
commit
fc9a6f8ff6
@ -21,10 +21,16 @@ if(UNIX AND NOT APPLE)
|
||||
set(DEPENDS_PREFIX depends/x86_64-pc-linux-gnu)
|
||||
elseif(APPLE)
|
||||
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
|
||||
EXECUTE_PROCESS( COMMAND system_profiler -detailLevel mini -json SPSoftwareDataType
|
||||
COMMAND jq .SPSoftwareDataType
|
||||
COMMAND jq .[]
|
||||
COMMAND jq .kernel_version
|
||||
COMMAND tr -d "Dawrin\" "
|
||||
OUTPUT_VARIABLE DARWIN_KERNEL_VERSION)
|
||||
if( ${ARCHITECTURE} STREQUAL "arm64" )
|
||||
set(DEPENDS_PREFIX depends/aarch64-apple-darwin21.2.0)
|
||||
set(DEPENDS_PREFIX depends/aarch64-apple-darwin${DARWIN_KERNEL_VERSION})
|
||||
else()
|
||||
set(DEPENDS_PREFIX depends/x86_64-apple-darwin19)
|
||||
set(DEPENDS_PREFIX depends/x86_64-apple-darwin${DARWIN_KERNEL_VERSION})
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
set(DEPENDS_PREFIX depends/x86_64-w64-mingw32)
|
||||
|
Loading…
Reference in New Issue
Block a user