Professional Documents
Culture Documents
C Make Lists
C Make Lists
C Make Lists
5)
include(cmake/cable/bootstrap.cmake)
include(CableBuildInfo)
include(CableBuildType)
include(CableToolchains)
include(HunterGate)
include(defaults/HunterCacheServers)
cable_configure_toolchain(DEFAULT cxx11)
project(ethminer)
set(PROJECT_VERSION 0.19.0)
hunter_add_package(jsoncpp)
find_package(jsoncpp CONFIG REQUIRED)
hunter_add_package(ethash)
find_package(ethash CONFIG REQUIRED)
configureProject()
if(APPLE)
set(USE_SYS_OPENCL ON)
endif()
message("--------------------------------------------------------------------------
--")
message("-- CMake ${CMAKE_VERSION}")
message("-- Build ${CMAKE_BUILD_TYPE} / ${CMAKE_SYSTEM_NAME}")
message("-----------------------------------------------------------------
components")
message("-- ETHASHCL Build OpenCL components $
{ETHASHCL}")
message("-- ETHASHCUDA Build CUDA components $
{ETHASHCUDA}")
message("-- ETHASHCPU Build CPU components (only for development) $
{ETHASHCPU}")
message("-- ETHDBUS Build D-Bus components $
{ETHDBUS}")
message("-- APICORE Build API Server components $
{APICORE}")
message("-- BINKERN Install AMD binary kernels $
{BINKERN}")
message("-- DEVBUILD Build with dev logging $
{DEVBUILD}")
message("-- USE_SYS_OPENCL Build with system OpenCL $
{USE_SYS_OPENCL}")
message("--------------------------------------------------------------------------
--")
message("")
include(EthCompilerSettings)
if(UNIX AND NOT APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
endif()
cable_add_buildinfo_library(PROJECT_NAME ${PROJECT_NAME})
add_subdirectory(libdevcore)
add_subdirectory(libethcore)
add_subdirectory(libhwmon)
add_subdirectory(libpoolprotocols)
if (ETHASHCL)
add_subdirectory(libethash-cl)
if (BINKERN)
add_subdirectory(libethash-cl/kernels)
endif()
endif ()
if (ETHASHCUDA)
add_subdirectory(libethash-cuda)
endif ()
if (ETHASHCPU)
add_subdirectory(libethash-cpu)
endif ()
if (APICORE)
add_subdirectory(libapicore)
endif()
add_subdirectory(ethminer)
if(WIN32)
set(CPACK_GENERATOR ZIP)
else()
set(CPACK_GENERATOR TGZ)
endif()
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_CHECKSUM SHA256)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY FALSE)
include(CPack)