2016-08-01 05:25:37 +00:00
|
|
|
function(eth_apply TARGET REQUIRED SUBMODULE)
|
|
|
|
|
|
|
|
# Base is where all dependencies for devcore are
|
|
|
|
if (${SUBMODULE} STREQUAL "base")
|
|
|
|
# if it's ethereum source dir, always build BuildInfo.h before
|
|
|
|
eth_use(${TARGET} ${REQUIRED} Dev::buildinfo)
|
|
|
|
|
|
|
|
target_include_directories(${TARGET} SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(${TARGET} ${Boost_THREAD_LIBRARIES})
|
|
|
|
target_link_libraries(${TARGET} ${Boost_RANDOM_LIBRARIES})
|
|
|
|
target_link_libraries(${TARGET} ${Boost_FILESYSTEM_LIBRARIES})
|
|
|
|
target_link_libraries(${TARGET} ${Boost_SYSTEM_LIBRARIES})
|
|
|
|
|
|
|
|
if (DEFINED MSVC)
|
|
|
|
target_link_libraries(${TARGET} ${Boost_CHRONO_LIBRARIES})
|
|
|
|
target_link_libraries(${TARGET} ${Boost_DATE_TIME_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
|
|
|
target_link_libraries(${TARGET} pthread)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2016-08-08 10:26:07 +00:00
|
|
|
if (${SUBMODULE} STREQUAL "soldevcore")
|
2016-08-01 05:25:37 +00:00
|
|
|
eth_use(${TARGET} ${REQUIRED} Dev::base)
|
2016-08-08 10:26:07 +00:00
|
|
|
target_link_libraries(${TARGET} soldevcore)
|
2016-08-01 05:25:37 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
endfunction()
|