2019-12-08 06:30:26 +00: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)
|
2022-12-17 11:14:28 +00:00
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD OR CMAKE_SYSTEM_NAME STREQUAL DragonFly)
|
2019-12-08 06:30:26 +00:00
|
|
|
set(XMRIG_OS_FREEBSD ON)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if (XMRIG_OS_WIN)
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DWIN32 -DXMRIG_OS_WIN)
|
2019-12-08 06:30:26 +00:00
|
|
|
elseif(XMRIG_OS_APPLE)
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DXMRIG_OS_APPLE)
|
2019-12-08 06:30:26 +00:00
|
|
|
|
|
|
|
if (XMRIG_OS_IOS)
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DXMRIG_OS_IOS)
|
2019-12-08 06:30:26 +00:00
|
|
|
else()
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DXMRIG_OS_MACOS)
|
2019-12-08 06:30:26 +00:00
|
|
|
endif()
|
2020-12-11 16:17:54 +00:00
|
|
|
|
|
|
|
if (XMRIG_ARM)
|
|
|
|
set(WITH_SECURE_JIT ON)
|
|
|
|
endif()
|
2019-12-08 06:30:26 +00:00
|
|
|
elseif(XMRIG_OS_UNIX)
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DXMRIG_OS_UNIX)
|
2019-12-08 06:30:26 +00:00
|
|
|
|
|
|
|
if (XMRIG_OS_ANDROID)
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DXMRIG_OS_ANDROID)
|
2019-12-08 06:30:26 +00:00
|
|
|
elseif (XMRIG_OS_LINUX)
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DXMRIG_OS_LINUX)
|
2019-12-08 06:30:26 +00:00
|
|
|
elseif (XMRIG_OS_FREEBSD)
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DXMRIG_OS_FREEBSD)
|
2019-12-08 06:30:26 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
2020-12-11 16:17:54 +00:00
|
|
|
|
|
|
|
if (WITH_SECURE_JIT)
|
2021-08-27 05:36:08 +00:00
|
|
|
add_definitions(-DXMRIG_SECURE_JIT)
|
2020-12-11 16:17:54 +00:00
|
|
|
endif()
|