aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/UseJsoncpp.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/UseJsoncpp.cmake')
-rw-r--r--cmake/UseJsoncpp.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/UseJsoncpp.cmake b/cmake/UseJsoncpp.cmake
new file mode 100644
index 00000000..6f605283
--- /dev/null
+++ b/cmake/UseJsoncpp.cmake
@@ -0,0 +1,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()