aboutsummaryrefslogblamecommitdiffstats
path: root/cmake/UseJsoncpp.cmake
blob: 6f60528335da6afa723f1410baf08fa05c47c1cb (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                                  
function(eth_apply TARGET REQUIRED) 
    find_package (Jsoncpp 0.60)
    eth_show_dependency(JSONCPP JsonCpp)
    if (JSONCPP_FOUND)
        target_include_directories(${TARGET} SYSTEM BEFORE PUBLIC ${JSONCPP_INCLUDE_DIRS})
        target_link_libraries(${TARGET} ${JSONCPP_LIBRARIES})
    elseif (NOT ${REQUIRED} STREQUAL "OPTIONAL")
        message(FATAL_ERROR "Jsoncpp library not found")
    endif()
endfunction()