2019-12-08 14:30:26 +08:00
|
|
|
if (WIN32)
|
|
|
|
set(XMRIG_OS_WIN ON)
|
|
|
|
elseif (APPLE)
|
|
|
|
set(XMRIG_OS_APPLE ON)
|
|
|
|
|
|
|
|
if (IOS OR CMAKE_SYSTEM_NAME STREQUAL iOS)
|
|
|
|
set(XMRIG_OS_IOS ON)
|
|
|
|
else()
|
|
|
|
set(XMRIG_OS_MACOS ON)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(XMRIG_OS_UNIX ON)
|
|
|
|
|
|
|
|
if (ANDROID OR CMAKE_SYSTEM_NAME MATCHES "Android")
|
|
|
|
set(XMRIG_OS_ANDROID ON)
|
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
set(XMRIG_OS_LINUX ON)
|
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
|
|
|
set(XMRIG_OS_FREEBSD ON)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if (XMRIG_OS_WIN)
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DWIN32 -DXMRIG_OS_WIN)
|
2019-12-08 14:30:26 +08:00
|
|
|
elseif(XMRIG_OS_APPLE)
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DXMRIG_OS_APPLE)
|
2019-12-08 14:30:26 +08:00
|
|
|
|
|
|
|
if (XMRIG_OS_IOS)
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DXMRIG_OS_IOS)
|
2019-12-08 14:30:26 +08:00
|
|
|
else()
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DXMRIG_OS_MACOS)
|
2019-12-08 14:30:26 +08:00
|
|
|
endif()
|
2020-12-12 00:17:54 +08:00
|
|
|
|
|
|
|
if (XMRIG_ARM)
|
|
|
|
set(WITH_SECURE_JIT ON)
|
|
|
|
endif()
|
2019-12-08 14:30:26 +08:00
|
|
|
elseif(XMRIG_OS_UNIX)
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DXMRIG_OS_UNIX)
|
2019-12-08 14:30:26 +08:00
|
|
|
|
|
|
|
if (XMRIG_OS_ANDROID)
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DXMRIG_OS_ANDROID)
|
2019-12-08 14:30:26 +08:00
|
|
|
elseif (XMRIG_OS_LINUX)
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DXMRIG_OS_LINUX)
|
2019-12-08 14:30:26 +08:00
|
|
|
elseif (XMRIG_OS_FREEBSD)
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DXMRIG_OS_FREEBSD)
|
2019-12-08 14:30:26 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
2020-12-12 00:17:54 +08:00
|
|
|
|
|
|
|
if (WITH_SECURE_JIT)
|
2021-08-27 13:36:08 +08:00
|
|
|
add_definitions(-DXMRIG_SECURE_JIT)
|
2020-12-12 00:17:54 +08:00
|
|
|
endif()
|